Merge branch 'vendor/FILE'
[dragonfly.git] / sys / dev / netif / re / re.c
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.93 " __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
60 #include <net/if.h>
61 #include <net/if_var.h>
62 #include <net/if_arp.h>
63 #include <net/ethernet.h>
64 #include <net/if_dl.h>
65 #include <net/if_media.h>
66
67 #include <net/bpf.h>
68
69 #include <vm/vm.h>              /* for vtophys */
70 #include <vm/pmap.h>            /* for vtophys */
71 #include <machine/clock.h>      /* for DELAY */
72
73 #include <machine/bus.h>
74 #include <machine/resource.h>
75 #include <sys/bus.h>
76 #include <sys/rman.h>
77 #include <sys/endian.h>
78
79 #include <dev/mii/mii.h>
80 #include <dev/re/if_rereg.h>
81
82 #if OS_VER < VERSION(5,3)
83 #include <pci/pcireg.h>
84 #include <pci/pcivar.h>
85 #include <machine/bus_pio.h>
86 #include <machine/bus_memio.h>
87 #else
88 #include <dev/pci/pcireg.h>
89 #include <dev/pci/pcivar.h>
90 #include <sys/module.h>
91 #endif
92
93 #if OS_VER > VERSION(5,9)
94 #include <sys/cdefs.h>
95 #include <sys/endian.h>
96 #include <net/if_types.h>
97 #include <net/if_vlan_var.h>
98 #endif
99 #else   /* __DragonFly__ */
100
101 #include <sys/param.h>
102 #include <sys/bus.h>
103 #include <sys/endian.h>
104 #include <sys/kernel.h>
105 #include <sys/systm.h>
106
107 #include <net/ethernet.h>
108 #include <net/if.h>
109 #include <net/if_arp.h>
110 #include <net/if_dl.h>
111 #include <net/if_media.h>
112 #include <net/if_poll.h>
113 #include <net/vlan/if_vlan_var.h>
114
115 #include <bus/pci/pcireg.h>
116 #include <bus/pci/pcivar.h>
117
118 #include <dev/netif/mii_layer/mii.h>
119 #include <dev/netif/re/if_revar.h>
120 #include <dev/netif/re/re.h>
121 #include <dev/netif/re/re_dragonfly.h>
122
123 #define RE_LOCK(sc)
124 #define RE_UNLOCK(sc)
125 #define RE_LOCK_ASSERT(sc)
126
127 #define RE_GET_IFNET(sc)        &(sc)->arpcom.ac_if
128
129 #endif  /* !__DragonFly__ */
130
131 #define EE_SET(x)                                       \
132         CSR_WRITE_1(sc, RE_EECMD,                       \
133                 CSR_READ_1(sc, RE_EECMD) | x)
134
135 #define EE_CLR(x)                                       \
136         CSR_WRITE_1(sc, RE_EECMD,                       \
137                 CSR_READ_1(sc, RE_EECMD) & ~x)
138
139 #ifndef __DragonFly__
140 /*
141  * Various supported device vendors/types and their names.
142  */
143 static struct re_type re_devs[] = {
144         {
145                 RT_VENDORID, RT_DEVICEID_8169,
146                 "Realtek PCI GBE Family Controller"
147         },
148         {
149                 RT_VENDORID, RT_DEVICEID_8169SC,
150                 "Realtek PCI GBE Family Controller"
151         },
152         {
153                 RT_VENDORID, RT_DEVICEID_8168,
154                 "Realtek PCIe GBE Family Controller"
155         },
156         {
157                 RT_VENDORID, RT_DEVICEID_8161,
158                 "Realtek PCIe GBE Family Controller"
159         },
160         {
161                 RT_VENDORID, RT_DEVICEID_8136,
162                 "Realtek PCIe FE Family Controller"
163         },
164         {
165                 DLINK_VENDORID, 0x4300,
166                 "Realtek PCI GBE Family Controller"
167         },
168         { 0, 0, NULL }
169 };
170
171 static int      re_probe                        __P((device_t));
172 static int      re_attach                       __P((device_t));
173 static int      re_detach                       __P((device_t));
174 static int      re_suspend                      __P((device_t));
175 static int      re_resume                       __P((device_t));
176 static int      re_shutdown                     __P((device_t));
177
178 static void MP_WritePhyUshort                   __P((struct re_softc*, u_int8_t, u_int16_t));
179 static u_int16_t MP_ReadPhyUshort               __P((struct re_softc*, u_int8_t));
180 static void MP_WriteEPhyUshort                  __P((struct re_softc*, u_int8_t, u_int16_t));
181 static u_int16_t MP_ReadEPhyUshort              __P((struct re_softc*, u_int8_t));
182 static u_int8_t MP_ReadEfuse                    __P((struct re_softc*, u_int16_t));
183 static void MP_WritePhyOcpRegWord       __P((struct re_softc*, u_int16_t, u_int8_t, u_int16_t));
184 static u_int16_t MP_ReadPhyOcpRegWord   __P((struct re_softc*, u_int16_t, u_int8_t));
185 static void MP_WriteMcuAccessRegWord    __P((struct re_softc*, u_int16_t, u_int16_t));
186 static u_int16_t MP_ReadMcuAccessRegWord  __P((struct re_softc*, u_int16_t));
187 static void MP_WritePciEConfigSpace     __P((struct re_softc*, u_int16_t, u_int32_t));
188 static u_int32_t MP_ReadPciEConfigSpace __P((struct re_softc*, u_int16_t));
189
190 static int re_check_dash  __P((struct re_softc *));
191
192 static void re_driver_start             __P((struct re_softc*));
193 static void re_driver_stop              __P((struct re_softc*));
194
195 static void re_hw_phy_config            __P((struct re_softc *));
196 static void re_init                     __P((void *));
197 static int  re_var_init                 __P((struct re_softc *));
198 static void re_reset                    __P((struct re_softc *));
199 static void re_stop                     __P((struct re_softc *));
200 static void re_setwol                   __P((struct re_softc *));
201 #endif  /* !__DragonFly__ */
202 static void re_clrwol                   __P((struct re_softc *));
203 #ifndef __DragonFly__
204 static void re_set_wol_linkspeed        __P((struct re_softc *));
205
206 static void re_start                            __P((struct ifnet *));
207 static int re_encap                             __P((struct re_softc *, struct mbuf *));
208 static void WritePacket                         __P((struct re_softc *, caddr_t, int, int, int, uint32_t, uint32_t));
209 static int CountFreeTxDescNum                   __P((struct re_descriptor));
210 static int CountMbufNum                         __P((struct mbuf *));
211 #ifdef RE_FIXUP_RX
212 static __inline void re_fixup_rx                __P((struct mbuf *));
213 #endif
214 static void re_txeof                            __P((struct re_softc *));
215
216 static void re_rxeof                            __P((struct re_softc *));
217
218 #if OS_VER < VERSION(7,0)
219 static void re_intr                             __P((void *));
220 #else
221 static int re_intr                              __P((void *));
222 #endif //OS_VER < VERSION(7,0)
223 #endif  /* !__DragonFly__ */
224 static void re_set_multicast_reg        __P((struct re_softc *, u_int32_t, u_int32_t));
225 #ifndef __DragonFly__
226 static void re_set_rx_packet_filter_in_sleep_state      __P((struct re_softc *));
227 #endif
228 static void re_set_rx_packet_filter     __P((struct re_softc *));
229 static void re_setmulti                 __P((struct re_softc *));
230 #ifndef __DragonFly__
231 static int  re_ioctl                    __P((struct ifnet *, u_long, caddr_t));
232 #endif
233 static u_int8_t re_link_ok      __P((struct re_softc *));
234 static void re_link_on_patch    __P((struct re_softc *));
235 #ifndef __DragonFly__
236 static void re_link_down_patch  __P((struct re_softc *));
237 static void re_init_timer       __P((struct re_softc *));
238 static void re_stop_timer       __P((struct re_softc *));
239 static void re_start_timer      __P((struct re_softc *));
240 static void re_tick                             __P((void *));
241 #if OS_VER < VERSION(7,0)
242 static void re_watchdog                         __P((struct ifnet *));
243 #endif
244 #endif  /* !__DragonFly__ */
245
246 static int  re_ifmedia_upd                      __P((struct ifnet *));
247 static void re_ifmedia_sts                      __P((struct ifnet *, struct ifmediareq *));
248
249 static void re_eeprom_ShiftOutBits              __P((struct re_softc *, int, int));
250 static u_int16_t re_eeprom_ShiftInBits          __P((struct re_softc *));
251 static void re_eeprom_EEpromCleanup             __P((struct re_softc *));
252 static void re_eeprom_getword                   __P((struct re_softc *, int, u_int16_t *));
253 static void re_read_eeprom                      __P((struct re_softc *, caddr_t, int, int, int));
254 #ifndef __DragonFly__
255 static void re_int_task                         (void *, int);
256 #endif  /* !__DragonFly__ */
257
258 static void re_phy_power_up(device_t dev);
259 static void re_phy_power_down(device_t dev);
260 #ifndef __DragonFly__
261 static int re_alloc_buf(struct re_softc *);
262 static void re_release_buf(struct re_softc *);
263 static void set_rxbufsize(struct re_softc*);
264 static void re_release_rx_buf(struct re_softc *);
265 static void re_release_tx_buf(struct re_softc *);
266 #endif  /* !__DragonFly__ */
267 static u_int32_t re_eri_read(struct re_softc *, int , int , int);
268 static int re_eri_write(struct re_softc *, int , int , u_int32_t, int);
269 static void OOB_mutex_lock(struct re_softc *);
270 static void OOB_mutex_unlock(struct re_softc *);
271
272 #ifdef __DragonFly__
273 u_int16_t MP_ReadMcuAccessRegWord(struct re_softc *, u_int16_t);
274 void MP_WriteMcuAccessRegWord(struct re_softc *, u_int16_t, u_int16_t);
275
276 u_int16_t MP_ReadPhyOcpRegWord(struct re_softc *, u_int16_t, u_int8_t);
277 void MP_WritePhyOcpRegWord(struct re_softc *, u_int16_t, u_int8_t, u_int16_t);
278
279 void MP_WritePhyUshort(struct re_softc *, u_int8_t, u_int16_t);
280 u_int16_t MP_ReadPhyUshort(struct re_softc *, u_int8_t);
281
282 u_int32_t MP_ReadPciEConfigSpace(struct re_softc *, u_int16_t);
283 void MP_WritePciEConfigSpace(struct re_softc *, u_int16_t, u_int32_t);
284
285 u_int16_t MP_ReadEPhyUshort(struct re_softc *, u_int8_t);
286 void MP_WriteEPhyUshort(struct re_softc *, u_int8_t, u_int16_t);
287
288 u_int8_t MP_ReadEfuse(struct re_softc *, u_int16_t);
289
290 void re_driver_start(struct re_softc *);
291 void re_driver_stop(struct re_softc *);
292 #endif  /* __DragonFly__ */
293
294 /* Tunables. */
295 static int msi_disable = 1;
296 TUNABLE_INT("hw.re.msi_disable", &msi_disable);
297 static int msix_disable = 0;
298 TUNABLE_INT("hw.re.msix_disable", &msix_disable);
299 static int prefer_iomap = 0;
300 TUNABLE_INT("hw.re.prefer_iomap", &prefer_iomap);
301 static int eee_enable = 0;
302 TUNABLE_INT("hw.re.eee_enable", &eee_enable);
303 static int phy_power_saving = 1;
304 TUNABLE_INT("hw.re.phy_power_saving", &phy_power_saving);
305 static int phy_mdix_mode = RE_ETH_PHY_AUTO_MDI_MDIX;
306 TUNABLE_INT("hw.re.phy_mdix_mode", &phy_mdix_mode);
307
308 #define RE_CSUM_FEATURES    (CSUM_IP | CSUM_TCP | CSUM_UDP)
309
310 #ifndef __DragonFly__
311 static device_method_t re_methods[] = {
312         /* Device interface */
313         DEVMETHOD(device_probe,         re_probe),
314         DEVMETHOD(device_attach,        re_attach),
315         DEVMETHOD(device_detach,        re_detach),
316         DEVMETHOD(device_suspend,   re_suspend),
317         DEVMETHOD(device_resume,    re_resume),
318         DEVMETHOD(device_shutdown,      re_shutdown),
319         { 0, 0 }
320 };
321
322 static driver_t re_driver = {
323         "re",
324         re_methods,
325         sizeof(struct re_softc)
326 };
327
328 static devclass_t re_devclass;
329
330 DRIVER_MODULE(if_re, pci, re_driver, re_devclass, 0, 0);
331 #endif  /* !__DragonFly__ */
332
333 static int re_is_ups_resume(struct re_softc *sc)
334 {
335         return (MP_ReadMcuAccessRegWord(sc, 0xD408) & BIT_0);
336 }
337
338 static void re_clear_ups_resume_bit(struct re_softc *sc)
339 {
340         MP_WriteMcuAccessRegWord(sc, 0xD408, MP_ReadMcuAccessRegWord(sc, 0xD408) & ~(BIT_0));
341 }
342
343 static void re_wait_phy_ups_resume(struct re_softc *sc, u_int16_t PhyState)
344 {
345         u_int16_t TmpPhyState;
346         int i=0;
347
348         do {
349                 TmpPhyState = MP_ReadPhyOcpRegWord(sc, 0x0A42, 0x10);
350                 TmpPhyState &= 0x7;
351                 DELAY(1000);
352                 i++;
353         } while ((i < 100) && (TmpPhyState != 2));
354 }
355
356 static void re_phy_power_up(device_t dev)
357 {
358         struct re_softc         *sc;
359         u_int8_t Data8;
360
361         sc = device_get_softc(dev);
362
363         if ((sc->re_if_flags & RL_FLAG_PHYWAKE_PM) != 0)
364                 CSR_WRITE_1(sc, RE_PMCH, CSR_READ_1(sc, RE_PMCH) | (BIT_6|BIT_7));
365
366         MP_WritePhyUshort(sc, 0x1F, 0x0000);
367
368         switch (sc->re_type) {
369         case MACFG_4:
370         case MACFG_5:
371         case MACFG_6:
372         case MACFG_21:
373         case MACFG_22:
374         case MACFG_23:
375         case MACFG_24:
376         case MACFG_25:
377         case MACFG_26:
378         case MACFG_27:
379         case MACFG_28:
380         case MACFG_31:
381         case MACFG_32:
382         case MACFG_33:
383         case MACFG_63:
384         case MACFG_64:
385         case MACFG_65:
386         case MACFG_66:
387                 MP_WritePhyUshort(sc, 0x0e, 0x0000);
388                 break;
389         case MACFG_56:
390         case MACFG_57:
391         case MACFG_58:
392         case MACFG_61:
393                 Data8 = re_eri_read(sc, 0x1AB, 1, ERIAR_ExGMAC);
394                 Data8 |= (BIT_2 | BIT_3 | BIT_4 | BIT_5 | BIT_6 | BIT_7);
395                 re_eri_write(sc, 0x1AB, 1, Data8, ERIAR_ExGMAC);
396                 break;
397         default:
398                 break;
399         };
400
401
402         MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN);
403
404         //wait mdc/mdio ready
405         switch(sc->re_type) {
406         case MACFG_61:
407         case MACFG_62:
408         case MACFG_67:
409                 DELAY(10000);
410                 break;
411         }
412
413         //wait ups resume (phy state 3)
414         switch(sc->re_type) {
415         case MACFG_68:
416         case MACFG_69:
417                 re_wait_phy_ups_resume(sc, 3);
418                 break;
419         };
420 }
421
422 static void re_phy_power_down(device_t dev)
423 {
424         struct re_softc         *sc;
425         u_int8_t Data8;
426
427         sc = device_get_softc(dev);
428
429         MP_WritePhyUshort(sc, 0x1F, 0x0000);
430
431         switch (sc->re_type) {
432         case MACFG_21:
433         case MACFG_22:
434         case MACFG_23:
435         case MACFG_24:
436         case MACFG_25:
437         case MACFG_26:
438         case MACFG_27:
439         case MACFG_28:
440         case MACFG_31:
441         case MACFG_32:
442         case MACFG_33:
443         case MACFG_63:
444         case MACFG_64:
445         case MACFG_65:
446         case MACFG_66:
447                 MP_WritePhyUshort(sc, 0x0e, 0x0200);
448                 MP_WritePhyUshort(sc, MII_BMCR, (BMCR_AUTOEN|BMCR_PDOWN));
449                 break;
450         case MACFG_56:
451         case MACFG_57:
452         case MACFG_58:
453         case MACFG_61:
454                 Data8 = re_eri_read(sc, 0x1AB, 1, ERIAR_ExGMAC);
455                 Data8 &= ~(BIT_2 | BIT_3 | BIT_4 | BIT_5 | BIT_6 | BIT_7);
456                 re_eri_write(sc, 0x1AB, 1, Data8, ERIAR_ExGMAC);
457
458                 MP_WritePhyUshort(sc, MII_BMCR, (BMCR_AUTOEN|BMCR_PDOWN));
459                 break;
460         default:
461                 MP_WritePhyUshort(sc, MII_BMCR, (BMCR_AUTOEN|BMCR_PDOWN));
462                 break;
463         }
464
465         switch (sc->re_type) {
466         case MACFG_56:
467         case MACFG_57:
468                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) & ~BIT_6);
469                 break;
470         }
471
472         switch (sc->re_type) {
473         case MACFG_68:
474         case MACFG_69:
475                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) & ~BIT_6);
476                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~BIT_6);
477                 break;
478         }
479
480         if ((sc->re_if_flags & RL_FLAG_PHYWAKE_PM) != 0)
481                 CSR_WRITE_1(sc, RE_PMCH, CSR_READ_1(sc, RE_PMCH) & ~(BIT_6|BIT_7));
482 }
483
484 #ifndef __DragonFly__
485 static void re_tx_dma_map_buf(void *arg, bus_dma_segment_t *segs, int nseg, int error)
486 {
487         union TxDesc *txptr = arg;
488
489         if (error) {
490                 txptr->ul[0] &= ~htole32(RL_TDESC_CMD_BUFLEN);
491                 txptr->so1.TxBuffL = 0;
492                 txptr->so1.TxBuffH = 0;
493                 return;
494         }
495
496         txptr->so1.TxBuffL = htole32(RL_ADDR_LO(segs->ds_addr));
497         txptr->so1.TxBuffH = htole32(RL_ADDR_HI(segs->ds_addr));
498 }
499
500 static void re_rx_dma_map_buf(void *arg, bus_dma_segment_t *segs, int nseg, int error)
501 {
502         union RxDesc *rxptr = arg;
503
504         if (error) {
505                 rxptr->ul[0] &= ~htole32(RL_RDESC_CMD_BUFLEN);
506                 rxptr->so0.RxBuffL = 0;
507                 rxptr->so0.RxBuffH = 0;
508                 return;
509         }
510
511         rxptr->so0.RxBuffL = htole32(RL_ADDR_LO(segs->ds_addr));
512         rxptr->so0.RxBuffH = htole32(RL_ADDR_HI(segs->ds_addr));
513 }
514
515 static void re_dma_map_rxdesc(void *arg, bus_dma_segment_t *segs, int nseg, int error)
516 {
517         struct re_softc *sc = arg;
518
519
520         if (error)
521                 return;
522
523         CSR_WRITE_4(sc, 0xe4, RL_ADDR_LO(segs->ds_addr));
524         CSR_WRITE_4(sc, 0xe8, RL_ADDR_HI(segs->ds_addr));
525 }
526
527 static void re_dma_map_txdesc(void *arg, bus_dma_segment_t *segs, int nseg, int error)
528 {
529         struct re_softc *sc = arg;
530
531
532         if (error)
533                 return;
534
535         CSR_WRITE_4(sc, 0x20, RL_ADDR_LO(segs->ds_addr));
536         CSR_WRITE_4(sc, 0x24, RL_ADDR_HI(segs->ds_addr));
537 }
538
539 /*
540  * Probe for a RealTek 8129/8139 chip. Check the PCI vendor and device
541  * IDs against our list and return a device name if we find a match.
542  */
543 static int re_probe(dev)        /* Search for Realtek NIC chip */
544 device_t                dev;
545 {
546         struct re_type          *t;
547         t = re_devs;
548         while (t->re_name != NULL) {
549                 if ((pci_get_vendor(dev) == t->re_vid) &&
550                     (pci_get_device(dev) == t->re_did)) {
551                         device_set_desc(dev, t->re_name);
552                         return(0);
553                 }
554                 t++;
555         }
556
557         return(ENXIO);
558 }
559 #endif  /* !__DragonFly__ */
560
561
562 static u_int32_t re_eri_read(struct re_softc *sc, int addr, int len, int type)
563 {
564         int i, val_shift, shift = 0;
565         u_int32_t value1 = 0, value2 = 0, mask;
566
567         if (len > 4 || len <= 0)
568                 return -1;
569
570         while (len > 0) {
571                 val_shift = addr % ERIAR_Addr_Align;
572                 addr = addr & ~0x3;
573
574                 CSR_WRITE_4(sc,RE_ERIAR,
575                             ERIAR_Read |
576                             type << ERIAR_Type_shift |
577                             ERIAR_ByteEn << ERIAR_ByteEn_shift |
578                             addr);
579
580                 for (i = 0; i < 10; i++) {
581                         DELAY(100);
582
583                         /* Check if the RTL8168 has completed ERI read */
584                         if (CSR_READ_4(sc,RE_ERIAR) & ERIAR_Flag)
585                                 break;
586                 }
587
588                 if (len == 1)           mask = (0xFF << (val_shift * 8)) & 0xFFFFFFFF;
589                 else if (len == 2)      mask = (0xFFFF << (val_shift * 8)) & 0xFFFFFFFF;
590                 else if (len == 3)      mask = (0xFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
591                 else                    mask = (0xFFFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
592
593                 value1 = CSR_READ_4(sc,RE_ERIDR) & mask;
594                 value2 |= (value1 >> val_shift * 8) << shift * 8;
595
596                 if (len <= 4 - val_shift)
597                         len = 0;
598                 else {
599                         len -= (4 - val_shift);
600                         shift = 4 - val_shift;
601                         addr += 4;
602                 }
603         }
604
605         return value2;
606 }
607
608 static int re_eri_write(struct re_softc *sc, int addr, int len, u_int32_t value, int type)
609 {
610
611         int i, val_shift, shift = 0;
612         u_int32_t value1 = 0, mask;
613
614         if (len > 4 || len <= 0)
615                 return -1;
616
617         while (len > 0) {
618                 val_shift = addr % ERIAR_Addr_Align;
619                 addr = addr & ~0x3;
620
621                 if (len == 1)           mask = (0xFF << (val_shift * 8)) & 0xFFFFFFFF;
622                 else if (len == 2)      mask = (0xFFFF << (val_shift * 8)) & 0xFFFFFFFF;
623                 else if (len == 3)      mask = (0xFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
624                 else                    mask = (0xFFFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
625
626                 value1 = re_eri_read(sc, addr, 4, type) & ~mask;
627                 value1 |= ((value << val_shift * 8) >> shift * 8);
628
629                 CSR_WRITE_4(sc,RE_ERIDR, value1);
630                 CSR_WRITE_4(sc,RE_ERIAR,
631                             ERIAR_Write |
632                             type << ERIAR_Type_shift |
633                             ERIAR_ByteEn << ERIAR_ByteEn_shift |
634                             addr);
635
636                 for (i = 0; i < 10; i++) {
637                         DELAY(100);
638
639                         /* Check if the RTL8168 has completed ERI write */
640                         if (!(CSR_READ_4(sc,RE_ERIAR) & ERIAR_Flag))
641                                 break;
642                 }
643
644                 if (len <= 4 - val_shift)
645                         len = 0;
646                 else {
647                         len -= (4 - val_shift);
648                         shift = 4 - val_shift;
649                         addr += 4;
650                 }
651         }
652
653         return 0;
654 }
655
656 static void
657 ClearAndSetEthPhyBit(
658         struct re_softc *sc,
659         u_int8_t   addr,
660         u_int16_t   clearmask,
661         u_int16_t   setmask
662 )
663 {
664         u_int16_t PhyRegValue;
665
666
667         PhyRegValue = MP_ReadPhyUshort(sc, addr);
668         PhyRegValue &= ~clearmask;
669         PhyRegValue |= setmask;
670         MP_WritePhyUshort(sc, addr, PhyRegValue);
671 }
672
673 static void
674 ClearEthPhyBit(
675         struct re_softc *sc,
676         u_int8_t   addr,
677         u_int16_t   mask
678 )
679 {
680         ClearAndSetEthPhyBit(sc,
681                              addr,
682                              mask,
683                              0
684                             );
685 }
686
687 static void
688 SetEthPhyBit(
689         struct re_softc *sc,
690         u_int8_t   addr,
691         u_int16_t   mask
692 )
693 {
694         ClearAndSetEthPhyBit(sc,
695                              addr,
696                              0,
697                              mask
698                             );
699 }
700
701 #ifndef __DragonFly__
702 static void re_release_rx_buf(struct re_softc *sc)
703 {
704         struct ifnet            *ifp;
705         int i;
706         ifp = RE_GET_IFNET(sc);
707
708         if (sc->re_desc.re_rx_mtag) {
709                 for (i = 0; i < RE_RX_BUF_NUM; i++) {
710                         if (sc->re_desc.rx_buf[i]!=NULL) {
711                                 bus_dmamap_sync(sc->re_desc.re_rx_mtag,
712                                                 sc->re_desc.re_rx_dmamap[i],
713                                                 BUS_DMASYNC_POSTREAD);
714                                 bus_dmamap_unload(sc->re_desc.re_rx_mtag,
715                                                   sc->re_desc.re_rx_dmamap[i]);
716                                 bus_dmamap_destroy(sc->re_desc.re_rx_mtag,
717                                                    sc->re_desc.re_rx_dmamap[i]);
718                                 m_freem(sc->re_desc.rx_buf[i]);
719                                 sc->re_desc.rx_buf[i] =NULL;
720                         }
721                 }
722                 bus_dma_tag_destroy(sc->re_desc.re_rx_mtag);
723                 sc->re_desc.re_rx_mtag =0;
724         }
725
726 }
727 static void re_release_tx_buf(struct re_softc *sc)
728 {
729         struct ifnet            *ifp;
730         int i;
731         ifp = RE_GET_IFNET(sc);
732
733         if (sc->re_desc.re_tx_mtag) {
734                 for (i = 0; i < RE_TX_BUF_NUM; i++) {
735
736                         bus_dmamap_destroy(sc->re_desc.re_tx_mtag,
737                                            sc->re_desc.re_tx_dmamap[i]);
738                         m_freem(sc->re_desc.tx_buf[i]);
739
740                 }
741                 bus_dma_tag_destroy(sc->re_desc.re_tx_mtag);
742                 sc->re_desc.re_tx_mtag = 0;
743         }
744
745
746 }
747 static void re_release_buf(struct re_softc *sc)
748 {
749         re_release_rx_buf(sc);
750         re_release_tx_buf(sc);
751 }
752
753
754
755 static int re_alloc_buf(struct re_softc *sc)
756 {
757         int error =0;
758         int i,size;
759
760         error = bus_dma_tag_create(sc->re_parent_tag, 1, 0,
761                                    BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL,
762                                    NULL, MCLBYTES* RE_NTXSEGS, RE_NTXSEGS, 4096, 0,
763                                    NULL, NULL, &sc->re_desc.re_tx_mtag);
764
765         if (error) {
766                 //device_printf(dev,"re_tx_mtag fail\n");
767                 //goto fail;
768                 return error;
769         }
770
771         error = bus_dma_tag_create(
772                         sc->re_parent_tag,
773                         RE_RX_BUFFER_ALIGN, 0,          /* alignment, boundary */
774                         BUS_SPACE_MAXADDR,              /* lowaddr */
775                         BUS_SPACE_MAXADDR,              /* highaddr */
776                         NULL, NULL,                     /* filter, filterarg */
777                         sc->re_rx_desc_buf_sz, 1,                       /* maxsize,nsegments */
778                         sc->re_rx_desc_buf_sz,                  /* maxsegsize */
779                         0,                              /* flags */
780                         NULL, NULL,                     /* lockfunc, lockarg */
781                         &sc->re_desc.re_rx_mtag);
782         if (error) {
783                 //device_printf(dev,"re_rx_mtag fail\n");
784                 //goto fail;
785                 return error;
786         }
787
788         if (sc->re_rx_mbuf_sz <= MCLBYTES)
789                 size = MCLBYTES;
790         else if (sc->re_rx_mbuf_sz <=  MJUMPAGESIZE)
791                 size = MJUMPAGESIZE;
792         else
793                 size =MJUM9BYTES;
794         for (i = 0; i < RE_RX_BUF_NUM; i++) {
795                 sc->re_desc.rx_buf[i] = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, size);
796                 if (!sc->re_desc.rx_buf[i]) {
797                         //device_printf(dev, "m_getcl fail!!!\n");
798                         error = ENXIO;
799                         //goto fail;
800                         return error;
801                 }
802
803                 sc->re_desc.rx_buf[i]->m_len = sc->re_desc.rx_buf[i]->m_pkthdr.len = size;
804 #ifdef RE_FIXUP_RX
805                 /*
806                  * This is part of an evil trick to deal with non-x86 platforms.
807                  * The RealTek chip requires RX buffers to be aligned on 64-bit
808                  * boundaries, but that will hose non-x86 machines. To get around
809                  * this, we leave some empty space at the start of each buffer
810                  * and for non-x86 hosts, we copy the buffer back six bytes
811                  * to achieve word alignment. This is slightly more efficient
812                  * than allocating a new buffer, copying the contents, and
813                  * discarding the old buffer.
814                  */
815                 m_adj(sc->re_desc.rx_buf[i], RE_ETHER_ALIGN);
816 #endif
817
818                 error = bus_dmamap_create(sc->re_desc.re_rx_mtag, BUS_DMA_NOWAIT, &sc->re_desc.re_rx_dmamap[i]);
819                 if (error) {
820                         //device_printf(dev, "bus_dmamap_create fail!!!\n");
821                         //goto fail;
822                         return error;
823                 }
824         }
825
826         for (i = 0; i < RE_TX_BUF_NUM; i++) {
827                 error = bus_dmamap_create(sc->re_desc.re_tx_mtag, BUS_DMA_NOWAIT, &sc->re_desc.re_tx_dmamap[i]);
828                 if (error) {
829                         //device_printf(dev, "bus_dmamap_create fail!!!\n");
830                         //goto fail;
831                         return error;
832                 }
833         }
834
835         return 0;
836 }
837
838 static void set_rxbufsize(struct re_softc *sc)
839 {
840
841         //printf("set size\n");
842
843         struct ifnet            *ifp;
844         ifp = RE_GET_IFNET(sc);
845         sc->re_rx_desc_buf_sz = (ifp->if_mtu > ETHERMTU) ? ifp->if_mtu: ETHERMTU;
846         sc->re_rx_desc_buf_sz += (ETHER_VLAN_ENCAP_LEN + ETHER_HDR_LEN + ETHER_CRC_LEN + 1);
847         CSR_WRITE_2(sc, RE_RxMaxSize, sc->re_rx_desc_buf_sz);
848 }
849 #endif  /* !__DragonFly__ */
850
851 static void DisableMcuBPs(struct re_softc *sc)
852 {
853         switch(sc->re_type) {
854         case MACFG_56:
855         case MACFG_57:
856         case MACFG_58:
857         case MACFG_59:
858         case MACFG_60:
859         case MACFG_61:
860         case MACFG_62:
861         case MACFG_67:
862         case MACFG_68:
863         case MACFG_69:
864                 CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_WRITECFG);
865                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) & ~BIT_0);
866                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) & ~BIT_7);
867                 CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_OFF);
868
869                 MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0000);
870                 MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0000);
871                 MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0000);
872                 MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0000);
873                 MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0000);
874                 MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0000);
875                 MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x0000);
876                 MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x0000);
877
878                 DELAY(3000);
879
880                 MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x0000);
881                 break;
882         }
883
884
885 }
886
887 static void re_hw_mac_mcu_config(struct re_softc *sc)
888 {
889         switch(sc->re_type) {
890         case MACFG_56:
891                 MP_WriteMcuAccessRegWord(sc, 0xE43C, 0x0000);
892                 MP_WriteMcuAccessRegWord(sc, 0xE43E, 0x0000);
893
894                 MP_WriteMcuAccessRegWord(sc, 0xE434, 0x0004);
895                 MP_WriteMcuAccessRegWord(sc, 0xE43C, 0x0004);
896
897                 DisableMcuBPs(sc);
898
899                 MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
900                 MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE01B);
901                 MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE022);
902                 MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE094);
903                 MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE097);
904                 MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE09A);
905                 MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE0B3);
906                 MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE0BA);
907                 MP_WriteMcuAccessRegWord(sc, 0xF810, 0x49D2);
908                 MP_WriteMcuAccessRegWord(sc, 0xF812, 0xF10D);
909                 MP_WriteMcuAccessRegWord(sc, 0xF814, 0x766C);
910                 MP_WriteMcuAccessRegWord(sc, 0xF816, 0x49E2);
911                 MP_WriteMcuAccessRegWord(sc, 0xF818, 0xF00A);
912                 MP_WriteMcuAccessRegWord(sc, 0xF81A, 0x1EC0);
913                 MP_WriteMcuAccessRegWord(sc, 0xF81C, 0x8EE1);
914                 MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xC60A);
915                 MP_WriteMcuAccessRegWord(sc, 0xF820, 0x77C0);
916                 MP_WriteMcuAccessRegWord(sc, 0xF822, 0x4870);
917                 MP_WriteMcuAccessRegWord(sc, 0xF824, 0x9FC0);
918                 MP_WriteMcuAccessRegWord(sc, 0xF826, 0x1EA0);
919                 MP_WriteMcuAccessRegWord(sc, 0xF828, 0xC707);
920                 MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x8EE1);
921                 MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x9D6C);
922                 MP_WriteMcuAccessRegWord(sc, 0xF82E, 0xC603);
923                 MP_WriteMcuAccessRegWord(sc, 0xF830, 0xBE00);
924                 MP_WriteMcuAccessRegWord(sc, 0xF832, 0xB416);
925                 MP_WriteMcuAccessRegWord(sc, 0xF834, 0x0076);
926                 MP_WriteMcuAccessRegWord(sc, 0xF836, 0xE86C);
927                 MP_WriteMcuAccessRegWord(sc, 0xF838, 0xC406);
928                 MP_WriteMcuAccessRegWord(sc, 0xF83A, 0x7580);
929                 MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x4852);
930                 MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x8D80);
931                 MP_WriteMcuAccessRegWord(sc, 0xF840, 0xC403);
932                 MP_WriteMcuAccessRegWord(sc, 0xF842, 0xBC00);
933                 MP_WriteMcuAccessRegWord(sc, 0xF844, 0xD3E0);
934                 MP_WriteMcuAccessRegWord(sc, 0xF846, 0x02C8);
935                 MP_WriteMcuAccessRegWord(sc, 0xF848, 0x8918);
936                 MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xE815);
937                 MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x1100);
938                 MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xF011);
939                 MP_WriteMcuAccessRegWord(sc, 0xF850, 0xE812);
940                 MP_WriteMcuAccessRegWord(sc, 0xF852, 0x4990);
941                 MP_WriteMcuAccessRegWord(sc, 0xF854, 0xF002);
942                 MP_WriteMcuAccessRegWord(sc, 0xF856, 0xE817);
943                 MP_WriteMcuAccessRegWord(sc, 0xF858, 0xE80E);
944                 MP_WriteMcuAccessRegWord(sc, 0xF85A, 0x4992);
945                 MP_WriteMcuAccessRegWord(sc, 0xF85C, 0xF002);
946                 MP_WriteMcuAccessRegWord(sc, 0xF85E, 0xE80E);
947                 MP_WriteMcuAccessRegWord(sc, 0xF860, 0xE80A);
948                 MP_WriteMcuAccessRegWord(sc, 0xF862, 0x4993);
949                 MP_WriteMcuAccessRegWord(sc, 0xF864, 0xF002);
950                 MP_WriteMcuAccessRegWord(sc, 0xF866, 0xE818);
951                 MP_WriteMcuAccessRegWord(sc, 0xF868, 0xE806);
952                 MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x4991);
953                 MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xF002);
954                 MP_WriteMcuAccessRegWord(sc, 0xF86E, 0xE838);
955                 MP_WriteMcuAccessRegWord(sc, 0xF870, 0xC25E);
956                 MP_WriteMcuAccessRegWord(sc, 0xF872, 0xBA00);
957                 MP_WriteMcuAccessRegWord(sc, 0xF874, 0xC056);
958                 MP_WriteMcuAccessRegWord(sc, 0xF876, 0x7100);
959                 MP_WriteMcuAccessRegWord(sc, 0xF878, 0xFF80);
960                 MP_WriteMcuAccessRegWord(sc, 0xF87A, 0x7100);
961                 MP_WriteMcuAccessRegWord(sc, 0xF87C, 0x4892);
962                 MP_WriteMcuAccessRegWord(sc, 0xF87E, 0x4813);
963                 MP_WriteMcuAccessRegWord(sc, 0xF880, 0x8900);
964                 MP_WriteMcuAccessRegWord(sc, 0xF882, 0xE00A);
965                 MP_WriteMcuAccessRegWord(sc, 0xF884, 0x7100);
966                 MP_WriteMcuAccessRegWord(sc, 0xF886, 0x4890);
967                 MP_WriteMcuAccessRegWord(sc, 0xF888, 0x4813);
968                 MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x8900);
969                 MP_WriteMcuAccessRegWord(sc, 0xF88C, 0xC74B);
970                 MP_WriteMcuAccessRegWord(sc, 0xF88E, 0x74F8);
971                 MP_WriteMcuAccessRegWord(sc, 0xF890, 0x48C2);
972                 MP_WriteMcuAccessRegWord(sc, 0xF892, 0x4841);
973                 MP_WriteMcuAccessRegWord(sc, 0xF894, 0x8CF8);
974                 MP_WriteMcuAccessRegWord(sc, 0xF896, 0xC746);
975                 MP_WriteMcuAccessRegWord(sc, 0xF898, 0x74FC);
976                 MP_WriteMcuAccessRegWord(sc, 0xF89A, 0x49C0);
977                 MP_WriteMcuAccessRegWord(sc, 0xF89C, 0xF120);
978                 MP_WriteMcuAccessRegWord(sc, 0xF89E, 0x49C1);
979                 MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0xF11E);
980                 MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0x74F8);
981                 MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0x49C0);
982                 MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xF01B);
983                 MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0x49C6);
984                 MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0xF119);
985                 MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x74F8);
986                 MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0x49C4);
987                 MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0xF013);
988                 MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xC536);
989                 MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0x74B0);
990                 MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0x49C1);
991                 MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0xF1FD);
992                 MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0xC537);
993                 MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0xC434);
994                 MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x9CA0);
995                 MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0xC435);
996                 MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x1C13);
997                 MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0x484F);
998                 MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0x9CA2);
999                 MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0xC52B);
1000                 MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x74B0);
1001                 MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x49C1);
1002                 MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0xF1FD);
1003                 MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0x74F8);
1004                 MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0x48C4);
1005                 MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0x8CF8);
1006                 MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0x7100);
1007                 MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0x4893);
1008                 MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x8900);
1009                 MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0xFF80);
1010                 MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0xC520);
1011                 MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0x74B0);
1012                 MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0x49C1);
1013                 MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0xF11C);
1014                 MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0xC71E);
1015                 MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0x74FC);
1016                 MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0x49C1);
1017                 MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0xF118);
1018                 MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0x49C0);
1019                 MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0xF116);
1020                 MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0x74F8);
1021                 MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0x49C0);
1022                 MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0xF013);
1023                 MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0x48C3);
1024                 MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x8CF8);
1025                 MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0xC516);
1026                 MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0x74A2);
1027                 MP_WriteMcuAccessRegWord(sc, 0xF900, 0x49CE);
1028                 MP_WriteMcuAccessRegWord(sc, 0xF902, 0xF1FE);
1029                 MP_WriteMcuAccessRegWord(sc, 0xF904, 0xC411);
1030                 MP_WriteMcuAccessRegWord(sc, 0xF906, 0x9CA0);
1031                 MP_WriteMcuAccessRegWord(sc, 0xF908, 0xC411);
1032                 MP_WriteMcuAccessRegWord(sc, 0xF90A, 0x1C13);
1033                 MP_WriteMcuAccessRegWord(sc, 0xF90C, 0x484F);
1034                 MP_WriteMcuAccessRegWord(sc, 0xF90E, 0x9CA2);
1035                 MP_WriteMcuAccessRegWord(sc, 0xF910, 0x74A2);
1036                 MP_WriteMcuAccessRegWord(sc, 0xF912, 0x49CF);
1037                 MP_WriteMcuAccessRegWord(sc, 0xF914, 0xF1FE);
1038                 MP_WriteMcuAccessRegWord(sc, 0xF916, 0x7100);
1039                 MP_WriteMcuAccessRegWord(sc, 0xF918, 0x4891);
1040                 MP_WriteMcuAccessRegWord(sc, 0xF91A, 0x8900);
1041                 MP_WriteMcuAccessRegWord(sc, 0xF91C, 0xFF80);
1042                 MP_WriteMcuAccessRegWord(sc, 0xF91E, 0xE400);
1043                 MP_WriteMcuAccessRegWord(sc, 0xF920, 0xD3E0);
1044                 MP_WriteMcuAccessRegWord(sc, 0xF922, 0xE000);
1045                 MP_WriteMcuAccessRegWord(sc, 0xF924, 0x0481);
1046                 MP_WriteMcuAccessRegWord(sc, 0xF926, 0x0C81);
1047                 MP_WriteMcuAccessRegWord(sc, 0xF928, 0xDE20);
1048                 MP_WriteMcuAccessRegWord(sc, 0xF92A, 0x0000);
1049                 MP_WriteMcuAccessRegWord(sc, 0xF92C, 0x0992);
1050                 MP_WriteMcuAccessRegWord(sc, 0xF92E, 0x1B76);
1051                 MP_WriteMcuAccessRegWord(sc, 0xF930, 0xC602);
1052                 MP_WriteMcuAccessRegWord(sc, 0xF932, 0xBE00);
1053                 MP_WriteMcuAccessRegWord(sc, 0xF934, 0x059C);
1054                 MP_WriteMcuAccessRegWord(sc, 0xF936, 0x1B76);
1055                 MP_WriteMcuAccessRegWord(sc, 0xF938, 0xC602);
1056                 MP_WriteMcuAccessRegWord(sc, 0xF93A, 0xBE00);
1057                 MP_WriteMcuAccessRegWord(sc, 0xF93C, 0x065A);
1058                 MP_WriteMcuAccessRegWord(sc, 0xF93E, 0xB400);
1059                 MP_WriteMcuAccessRegWord(sc, 0xF940, 0x18DE);
1060                 MP_WriteMcuAccessRegWord(sc, 0xF942, 0x2008);
1061                 MP_WriteMcuAccessRegWord(sc, 0xF944, 0x4001);
1062                 MP_WriteMcuAccessRegWord(sc, 0xF946, 0xF10F);
1063                 MP_WriteMcuAccessRegWord(sc, 0xF948, 0x7342);
1064                 MP_WriteMcuAccessRegWord(sc, 0xF94A, 0x1880);
1065                 MP_WriteMcuAccessRegWord(sc, 0xF94C, 0x2008);
1066                 MP_WriteMcuAccessRegWord(sc, 0xF94E, 0x0009);
1067                 MP_WriteMcuAccessRegWord(sc, 0xF950, 0x4018);
1068                 MP_WriteMcuAccessRegWord(sc, 0xF952, 0xF109);
1069                 MP_WriteMcuAccessRegWord(sc, 0xF954, 0x7340);
1070                 MP_WriteMcuAccessRegWord(sc, 0xF956, 0x25BC);
1071                 MP_WriteMcuAccessRegWord(sc, 0xF958, 0x130F);
1072                 MP_WriteMcuAccessRegWord(sc, 0xF95A, 0xF105);
1073                 MP_WriteMcuAccessRegWord(sc, 0xF95C, 0xC00A);
1074                 MP_WriteMcuAccessRegWord(sc, 0xF95E, 0x7300);
1075                 MP_WriteMcuAccessRegWord(sc, 0xF960, 0x4831);
1076                 MP_WriteMcuAccessRegWord(sc, 0xF962, 0x9B00);
1077                 MP_WriteMcuAccessRegWord(sc, 0xF964, 0xB000);
1078                 MP_WriteMcuAccessRegWord(sc, 0xF966, 0x7340);
1079                 MP_WriteMcuAccessRegWord(sc, 0xF968, 0x8320);
1080                 MP_WriteMcuAccessRegWord(sc, 0xF96A, 0xC302);
1081                 MP_WriteMcuAccessRegWord(sc, 0xF96C, 0xBB00);
1082                 MP_WriteMcuAccessRegWord(sc, 0xF96E, 0x0C12);
1083                 MP_WriteMcuAccessRegWord(sc, 0xF970, 0xE860);
1084                 MP_WriteMcuAccessRegWord(sc, 0xF972, 0xC406);
1085                 MP_WriteMcuAccessRegWord(sc, 0xF974, 0x7580);
1086                 MP_WriteMcuAccessRegWord(sc, 0xF976, 0x4851);
1087                 MP_WriteMcuAccessRegWord(sc, 0xF978, 0x8D80);
1088                 MP_WriteMcuAccessRegWord(sc, 0xF97A, 0xC403);
1089                 MP_WriteMcuAccessRegWord(sc, 0xF97C, 0xBC00);
1090                 MP_WriteMcuAccessRegWord(sc, 0xF97E, 0xD3E0);
1091                 MP_WriteMcuAccessRegWord(sc, 0xF980, 0x02C8);
1092                 MP_WriteMcuAccessRegWord(sc, 0xF982, 0xC406);
1093                 MP_WriteMcuAccessRegWord(sc, 0xF984, 0x7580);
1094                 MP_WriteMcuAccessRegWord(sc, 0xF986, 0x4850);
1095                 MP_WriteMcuAccessRegWord(sc, 0xF988, 0x8D80);
1096                 MP_WriteMcuAccessRegWord(sc, 0xF98A, 0xC403);
1097                 MP_WriteMcuAccessRegWord(sc, 0xF98C, 0xBC00);
1098                 MP_WriteMcuAccessRegWord(sc, 0xF98E, 0xD3E0);
1099                 MP_WriteMcuAccessRegWord(sc, 0xF990, 0x0298);
1100
1101                 MP_WriteMcuAccessRegWord(sc, 0xDE30, 0x0080);
1102
1103                 MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
1104
1105                 MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0075);
1106                 MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x02B1);
1107                 MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0991);
1108                 MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x059B);
1109                 MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0659);
1110                 MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0000);
1111                 MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x02BB);
1112                 MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x0279);
1113                 break;
1114         case MACFG_58:
1115                 DisableMcuBPs(sc);
1116
1117                 MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
1118                 MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE011);
1119                 MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE015);
1120                 MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE018);
1121                 MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE01B);
1122                 MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE027);
1123                 MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE043);
1124                 MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE065);
1125                 MP_WriteMcuAccessRegWord(sc, 0xF810, 0x49E2);
1126                 MP_WriteMcuAccessRegWord(sc, 0xF812, 0xF005);
1127                 MP_WriteMcuAccessRegWord(sc, 0xF814, 0x49EA);
1128                 MP_WriteMcuAccessRegWord(sc, 0xF816, 0xF003);
1129                 MP_WriteMcuAccessRegWord(sc, 0xF818, 0xC404);
1130                 MP_WriteMcuAccessRegWord(sc, 0xF81A, 0xBC00);
1131                 MP_WriteMcuAccessRegWord(sc, 0xF81C, 0xC403);
1132                 MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xBC00);
1133                 MP_WriteMcuAccessRegWord(sc, 0xF820, 0x0496);
1134                 MP_WriteMcuAccessRegWord(sc, 0xF822, 0x051A);
1135                 MP_WriteMcuAccessRegWord(sc, 0xF824, 0x1D01);
1136                 MP_WriteMcuAccessRegWord(sc, 0xF826, 0x8DE8);
1137                 MP_WriteMcuAccessRegWord(sc, 0xF828, 0xC602);
1138                 MP_WriteMcuAccessRegWord(sc, 0xF82A, 0xBE00);
1139                 MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x0206);
1140                 MP_WriteMcuAccessRegWord(sc, 0xF82E, 0x1B76);
1141                 MP_WriteMcuAccessRegWord(sc, 0xF830, 0xC202);
1142                 MP_WriteMcuAccessRegWord(sc, 0xF832, 0xBA00);
1143                 MP_WriteMcuAccessRegWord(sc, 0xF834, 0x058A);
1144                 MP_WriteMcuAccessRegWord(sc, 0xF836, 0x1B76);
1145                 MP_WriteMcuAccessRegWord(sc, 0xF838, 0xC602);
1146                 MP_WriteMcuAccessRegWord(sc, 0xF83A, 0xBE00);
1147                 MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x0648);
1148                 MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x74E6);
1149                 MP_WriteMcuAccessRegWord(sc, 0xF840, 0x1B78);
1150                 MP_WriteMcuAccessRegWord(sc, 0xF842, 0x46DC);
1151                 MP_WriteMcuAccessRegWord(sc, 0xF844, 0x1300);
1152                 MP_WriteMcuAccessRegWord(sc, 0xF846, 0xF005);
1153                 MP_WriteMcuAccessRegWord(sc, 0xF848, 0x74F8);
1154                 MP_WriteMcuAccessRegWord(sc, 0xF84A, 0x48C3);
1155                 MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x48C4);
1156                 MP_WriteMcuAccessRegWord(sc, 0xF84E, 0x8CF8);
1157                 MP_WriteMcuAccessRegWord(sc, 0xF850, 0x64E7);
1158                 MP_WriteMcuAccessRegWord(sc, 0xF852, 0xC302);
1159                 MP_WriteMcuAccessRegWord(sc, 0xF854, 0xBB00);
1160                 MP_WriteMcuAccessRegWord(sc, 0xF856, 0x068E);
1161                 MP_WriteMcuAccessRegWord(sc, 0xF858, 0x74E4);
1162                 MP_WriteMcuAccessRegWord(sc, 0xF85A, 0x49C5);
1163                 MP_WriteMcuAccessRegWord(sc, 0xF85C, 0xF106);
1164                 MP_WriteMcuAccessRegWord(sc, 0xF85E, 0x49C6);
1165                 MP_WriteMcuAccessRegWord(sc, 0xF860, 0xF107);
1166                 MP_WriteMcuAccessRegWord(sc, 0xF862, 0x48C8);
1167                 MP_WriteMcuAccessRegWord(sc, 0xF864, 0x48C9);
1168                 MP_WriteMcuAccessRegWord(sc, 0xF866, 0xE011);
1169                 MP_WriteMcuAccessRegWord(sc, 0xF868, 0x48C9);
1170                 MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x4848);
1171                 MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xE00E);
1172                 MP_WriteMcuAccessRegWord(sc, 0xF86E, 0x4848);
1173                 MP_WriteMcuAccessRegWord(sc, 0xF870, 0x49C7);
1174                 MP_WriteMcuAccessRegWord(sc, 0xF872, 0xF00A);
1175                 MP_WriteMcuAccessRegWord(sc, 0xF874, 0x48C9);
1176                 MP_WriteMcuAccessRegWord(sc, 0xF876, 0xC60D);
1177                 MP_WriteMcuAccessRegWord(sc, 0xF878, 0x1D1F);
1178                 MP_WriteMcuAccessRegWord(sc, 0xF87A, 0x8DC2);
1179                 MP_WriteMcuAccessRegWord(sc, 0xF87C, 0x1D00);
1180                 MP_WriteMcuAccessRegWord(sc, 0xF87E, 0x8DC3);
1181                 MP_WriteMcuAccessRegWord(sc, 0xF880, 0x1D11);
1182                 MP_WriteMcuAccessRegWord(sc, 0xF882, 0x8DC0);
1183                 MP_WriteMcuAccessRegWord(sc, 0xF884, 0xE002);
1184                 MP_WriteMcuAccessRegWord(sc, 0xF886, 0x4849);
1185                 MP_WriteMcuAccessRegWord(sc, 0xF888, 0x94E5);
1186                 MP_WriteMcuAccessRegWord(sc, 0xF88A, 0xC602);
1187                 MP_WriteMcuAccessRegWord(sc, 0xF88C, 0xBE00);
1188                 MP_WriteMcuAccessRegWord(sc, 0xF88E, 0x0238);
1189                 MP_WriteMcuAccessRegWord(sc, 0xF890, 0xE434);
1190                 MP_WriteMcuAccessRegWord(sc, 0xF892, 0x49D9);
1191                 MP_WriteMcuAccessRegWord(sc, 0xF894, 0xF01B);
1192                 MP_WriteMcuAccessRegWord(sc, 0xF896, 0xC31E);
1193                 MP_WriteMcuAccessRegWord(sc, 0xF898, 0x7464);
1194                 MP_WriteMcuAccessRegWord(sc, 0xF89A, 0x49C4);
1195                 MP_WriteMcuAccessRegWord(sc, 0xF89C, 0xF114);
1196                 MP_WriteMcuAccessRegWord(sc, 0xF89E, 0xC31B);
1197                 MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0x6460);
1198                 MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0x14FA);
1199                 MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0xFA02);
1200                 MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xE00F);
1201                 MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0xC317);
1202                 MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0x7460);
1203                 MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x49C0);
1204                 MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xF10B);
1205                 MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0xC311);
1206                 MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0x7462);
1207                 MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0x48C1);
1208                 MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0x9C62);
1209                 MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0x4841);
1210                 MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0x9C62);
1211                 MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0xC30A);
1212                 MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x1C04);
1213                 MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x8C60);
1214                 MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0xE004);
1215                 MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0x1C15);
1216                 MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0xC305);
1217                 MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0x8C60);
1218                 MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0xC602);
1219                 MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0xBE00);
1220                 MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0x0374);
1221                 MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0xE434);
1222                 MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0xE030);
1223                 MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0xE61C);
1224                 MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0xE906);
1225                 MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0xC602);
1226                 MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0xBE00);
1227                 MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0x0000);
1228
1229                 MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
1230
1231                 MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0493);
1232                 MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0205);
1233                 MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0589);
1234                 MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0647);
1235                 MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0000);
1236                 MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0215);
1237                 MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x0285);
1238                 break;
1239         case MACFG_59:
1240                 DisableMcuBPs(sc);
1241
1242                 MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
1243                 MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE00A);
1244                 MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE01B);
1245                 MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE03D);
1246                 MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE04C);
1247                 MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE053);
1248                 MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE055);
1249                 MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE06C);
1250                 MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC202);
1251                 MP_WriteMcuAccessRegWord(sc, 0xF812, 0xBA00);
1252                 MP_WriteMcuAccessRegWord(sc, 0xF814, 0x0DFC);
1253                 MP_WriteMcuAccessRegWord(sc, 0xF816, 0xC511);
1254                 MP_WriteMcuAccessRegWord(sc, 0xF818, 0x74A2);
1255                 MP_WriteMcuAccessRegWord(sc, 0xF81A, 0x8CA5);
1256                 MP_WriteMcuAccessRegWord(sc, 0xF81C, 0x74A0);
1257                 MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xC50B);
1258                 MP_WriteMcuAccessRegWord(sc, 0xF820, 0x9CA2);
1259                 MP_WriteMcuAccessRegWord(sc, 0xF822, 0x1C11);
1260                 MP_WriteMcuAccessRegWord(sc, 0xF824, 0x9CA0);
1261                 MP_WriteMcuAccessRegWord(sc, 0xF826, 0xC506);
1262                 MP_WriteMcuAccessRegWord(sc, 0xF828, 0xBD00);
1263                 MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x7444);
1264                 MP_WriteMcuAccessRegWord(sc, 0xF82C, 0xC502);
1265                 MP_WriteMcuAccessRegWord(sc, 0xF82E, 0xBD00);
1266                 MP_WriteMcuAccessRegWord(sc, 0xF830, 0x0A30);
1267                 MP_WriteMcuAccessRegWord(sc, 0xF832, 0x0A46);
1268                 MP_WriteMcuAccessRegWord(sc, 0xF834, 0xE434);
1269                 MP_WriteMcuAccessRegWord(sc, 0xF836, 0xE096);
1270                 MP_WriteMcuAccessRegWord(sc, 0xF838, 0xD3C0);
1271                 MP_WriteMcuAccessRegWord(sc, 0xF83A, 0x49D9);
1272                 MP_WriteMcuAccessRegWord(sc, 0xF83C, 0xF019);
1273                 MP_WriteMcuAccessRegWord(sc, 0xF83E, 0xC520);
1274                 MP_WriteMcuAccessRegWord(sc, 0xF840, 0x64A5);
1275                 MP_WriteMcuAccessRegWord(sc, 0xF842, 0x1400);
1276                 MP_WriteMcuAccessRegWord(sc, 0xF844, 0xF007);
1277                 MP_WriteMcuAccessRegWord(sc, 0xF846, 0x0C01);
1278                 MP_WriteMcuAccessRegWord(sc, 0xF848, 0x8CA5);
1279                 MP_WriteMcuAccessRegWord(sc, 0xF84A, 0x1C15);
1280                 MP_WriteMcuAccessRegWord(sc, 0xF84C, 0xC515);
1281                 MP_WriteMcuAccessRegWord(sc, 0xF84E, 0x9CA0);
1282                 MP_WriteMcuAccessRegWord(sc, 0xF850, 0xE00F);
1283                 MP_WriteMcuAccessRegWord(sc, 0xF852, 0xC513);
1284                 MP_WriteMcuAccessRegWord(sc, 0xF854, 0x74A0);
1285                 MP_WriteMcuAccessRegWord(sc, 0xF856, 0x48C8);
1286                 MP_WriteMcuAccessRegWord(sc, 0xF858, 0x48CA);
1287                 MP_WriteMcuAccessRegWord(sc, 0xF85A, 0x9CA0);
1288                 MP_WriteMcuAccessRegWord(sc, 0xF85C, 0xC510);
1289                 MP_WriteMcuAccessRegWord(sc, 0xF85E, 0x1B00);
1290                 MP_WriteMcuAccessRegWord(sc, 0xF860, 0x9BA0);
1291                 MP_WriteMcuAccessRegWord(sc, 0xF862, 0x1B1C);
1292                 MP_WriteMcuAccessRegWord(sc, 0xF864, 0x483F);
1293                 MP_WriteMcuAccessRegWord(sc, 0xF866, 0x9BA2);
1294                 MP_WriteMcuAccessRegWord(sc, 0xF868, 0x1B04);
1295                 MP_WriteMcuAccessRegWord(sc, 0xF86A, 0xC506);
1296                 MP_WriteMcuAccessRegWord(sc, 0xF86C, 0x9BA0);
1297                 MP_WriteMcuAccessRegWord(sc, 0xF86E, 0xC603);
1298                 MP_WriteMcuAccessRegWord(sc, 0xF870, 0xBE00);
1299                 MP_WriteMcuAccessRegWord(sc, 0xF872, 0x0298);
1300                 MP_WriteMcuAccessRegWord(sc, 0xF874, 0x03DE);
1301                 MP_WriteMcuAccessRegWord(sc, 0xF876, 0xE434);
1302                 MP_WriteMcuAccessRegWord(sc, 0xF878, 0xE096);
1303                 MP_WriteMcuAccessRegWord(sc, 0xF87A, 0xE860);
1304                 MP_WriteMcuAccessRegWord(sc, 0xF87C, 0xDE20);
1305                 MP_WriteMcuAccessRegWord(sc, 0xF87E, 0xD3C0);
1306                 MP_WriteMcuAccessRegWord(sc, 0xF880, 0xC50F);
1307                 MP_WriteMcuAccessRegWord(sc, 0xF882, 0x76A4);
1308                 MP_WriteMcuAccessRegWord(sc, 0xF884, 0x49E3);
1309                 MP_WriteMcuAccessRegWord(sc, 0xF886, 0xF007);
1310                 MP_WriteMcuAccessRegWord(sc, 0xF888, 0x49C0);
1311                 MP_WriteMcuAccessRegWord(sc, 0xF88A, 0xF103);
1312                 MP_WriteMcuAccessRegWord(sc, 0xF88C, 0xC607);
1313                 MP_WriteMcuAccessRegWord(sc, 0xF88E, 0xBE00);
1314                 MP_WriteMcuAccessRegWord(sc, 0xF890, 0xC606);
1315                 MP_WriteMcuAccessRegWord(sc, 0xF892, 0xBE00);
1316                 MP_WriteMcuAccessRegWord(sc, 0xF894, 0xC602);
1317                 MP_WriteMcuAccessRegWord(sc, 0xF896, 0xBE00);
1318                 MP_WriteMcuAccessRegWord(sc, 0xF898, 0x0A88);
1319                 MP_WriteMcuAccessRegWord(sc, 0xF89A, 0x0A64);
1320                 MP_WriteMcuAccessRegWord(sc, 0xF89C, 0x0A68);
1321                 MP_WriteMcuAccessRegWord(sc, 0xF89E, 0xDC00);
1322                 MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0xC707);
1323                 MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0x1D00);
1324                 MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0x8DE2);
1325                 MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0x48C1);
1326                 MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0xC502);
1327                 MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0xBD00);
1328                 MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x00AA);
1329                 MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xE0C0);
1330                 MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0xC502);
1331                 MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xBD00);
1332                 MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0x0132);
1333                 MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0xC50C);
1334                 MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0x74A2);
1335                 MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0x49CE);
1336                 MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0xF1FE);
1337                 MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x1C00);
1338                 MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x9EA0);
1339                 MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x1C1C);
1340                 MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0x484F);
1341                 MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0x9CA2);
1342                 MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0xC402);
1343                 MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0xBC00);
1344                 MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x0AFA);
1345                 MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0xDE20);
1346                 MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0xE000);
1347                 MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0xE092);
1348                 MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0xE430);
1349                 MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0xDE20);
1350                 MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0xE0C0);
1351                 MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0xE860);
1352                 MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0xE84C);
1353                 MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0xB400);
1354                 MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0xB430);
1355                 MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0xE410);
1356                 MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0xC0AE);
1357                 MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0xB407);
1358                 MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0xB406);
1359                 MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0xB405);
1360                 MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0xB404);
1361                 MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0xB403);
1362                 MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0xB402);
1363                 MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0xB401);
1364                 MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0xC7EE);
1365                 MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0x76F4);
1366                 MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0xC2ED);
1367                 MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0xC3ED);
1368                 MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0xC1EF);
1369                 MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0xC5F3);
1370                 MP_WriteMcuAccessRegWord(sc, 0xF900, 0x74A0);
1371                 MP_WriteMcuAccessRegWord(sc, 0xF902, 0x49CD);
1372                 MP_WriteMcuAccessRegWord(sc, 0xF904, 0xF001);
1373                 MP_WriteMcuAccessRegWord(sc, 0xF906, 0xC5EE);
1374                 MP_WriteMcuAccessRegWord(sc, 0xF908, 0x74A0);
1375                 MP_WriteMcuAccessRegWord(sc, 0xF90A, 0x49C1);
1376                 MP_WriteMcuAccessRegWord(sc, 0xF90C, 0xF105);
1377                 MP_WriteMcuAccessRegWord(sc, 0xF90E, 0xC5E4);
1378                 MP_WriteMcuAccessRegWord(sc, 0xF910, 0x74A2);
1379                 MP_WriteMcuAccessRegWord(sc, 0xF912, 0x49CE);
1380                 MP_WriteMcuAccessRegWord(sc, 0xF914, 0xF00B);
1381                 MP_WriteMcuAccessRegWord(sc, 0xF916, 0x7444);
1382                 MP_WriteMcuAccessRegWord(sc, 0xF918, 0x484B);
1383                 MP_WriteMcuAccessRegWord(sc, 0xF91A, 0x9C44);
1384                 MP_WriteMcuAccessRegWord(sc, 0xF91C, 0x1C10);
1385                 MP_WriteMcuAccessRegWord(sc, 0xF91E, 0x9C62);
1386                 MP_WriteMcuAccessRegWord(sc, 0xF920, 0x1C11);
1387                 MP_WriteMcuAccessRegWord(sc, 0xF922, 0x8C60);
1388                 MP_WriteMcuAccessRegWord(sc, 0xF924, 0x1C00);
1389                 MP_WriteMcuAccessRegWord(sc, 0xF926, 0x9CF6);
1390                 MP_WriteMcuAccessRegWord(sc, 0xF928, 0xE0E1);
1391                 MP_WriteMcuAccessRegWord(sc, 0xF92A, 0x49E7);
1392                 MP_WriteMcuAccessRegWord(sc, 0xF92C, 0xF016);
1393                 MP_WriteMcuAccessRegWord(sc, 0xF92E, 0x1D80);
1394                 MP_WriteMcuAccessRegWord(sc, 0xF930, 0x8DF4);
1395                 MP_WriteMcuAccessRegWord(sc, 0xF932, 0x74F8);
1396                 MP_WriteMcuAccessRegWord(sc, 0xF934, 0x4843);
1397                 MP_WriteMcuAccessRegWord(sc, 0xF936, 0x8CF8);
1398                 MP_WriteMcuAccessRegWord(sc, 0xF938, 0x74F8);
1399                 MP_WriteMcuAccessRegWord(sc, 0xF93A, 0x74F8);
1400                 MP_WriteMcuAccessRegWord(sc, 0xF93C, 0x7444);
1401                 MP_WriteMcuAccessRegWord(sc, 0xF93E, 0x48C8);
1402                 MP_WriteMcuAccessRegWord(sc, 0xF940, 0x48C9);
1403                 MP_WriteMcuAccessRegWord(sc, 0xF942, 0x48CA);
1404                 MP_WriteMcuAccessRegWord(sc, 0xF944, 0x9C44);
1405                 MP_WriteMcuAccessRegWord(sc, 0xF946, 0x74F8);
1406                 MP_WriteMcuAccessRegWord(sc, 0xF948, 0x4844);
1407                 MP_WriteMcuAccessRegWord(sc, 0xF94A, 0x8CF8);
1408                 MP_WriteMcuAccessRegWord(sc, 0xF94C, 0x1E01);
1409                 MP_WriteMcuAccessRegWord(sc, 0xF94E, 0xE8D0);
1410                 MP_WriteMcuAccessRegWord(sc, 0xF950, 0x7420);
1411                 MP_WriteMcuAccessRegWord(sc, 0xF952, 0x48C1);
1412                 MP_WriteMcuAccessRegWord(sc, 0xF954, 0x9C20);
1413                 MP_WriteMcuAccessRegWord(sc, 0xF956, 0xE0CA);
1414                 MP_WriteMcuAccessRegWord(sc, 0xF958, 0x49E6);
1415                 MP_WriteMcuAccessRegWord(sc, 0xF95A, 0xF029);
1416                 MP_WriteMcuAccessRegWord(sc, 0xF95C, 0x1D40);
1417                 MP_WriteMcuAccessRegWord(sc, 0xF95E, 0x8DF4);
1418                 MP_WriteMcuAccessRegWord(sc, 0xF960, 0x74FC);
1419                 MP_WriteMcuAccessRegWord(sc, 0xF962, 0x49C0);
1420                 MP_WriteMcuAccessRegWord(sc, 0xF964, 0xF123);
1421                 MP_WriteMcuAccessRegWord(sc, 0xF966, 0x49C1);
1422                 MP_WriteMcuAccessRegWord(sc, 0xF968, 0xF121);
1423                 MP_WriteMcuAccessRegWord(sc, 0xF96A, 0x74F8);
1424                 MP_WriteMcuAccessRegWord(sc, 0xF96C, 0x49C0);
1425                 MP_WriteMcuAccessRegWord(sc, 0xF96E, 0xF01E);
1426                 MP_WriteMcuAccessRegWord(sc, 0xF970, 0x48C4);
1427                 MP_WriteMcuAccessRegWord(sc, 0xF972, 0x8CF8);
1428                 MP_WriteMcuAccessRegWord(sc, 0xF974, 0x1E00);
1429                 MP_WriteMcuAccessRegWord(sc, 0xF976, 0xE8BC);
1430                 MP_WriteMcuAccessRegWord(sc, 0xF978, 0xC5B2);
1431                 MP_WriteMcuAccessRegWord(sc, 0xF97A, 0x74A0);
1432                 MP_WriteMcuAccessRegWord(sc, 0xF97C, 0x49C3);
1433                 MP_WriteMcuAccessRegWord(sc, 0xF97E, 0xF016);
1434                 MP_WriteMcuAccessRegWord(sc, 0xF980, 0xC5B0);
1435                 MP_WriteMcuAccessRegWord(sc, 0xF982, 0x74A4);
1436                 MP_WriteMcuAccessRegWord(sc, 0xF984, 0x49C2);
1437                 MP_WriteMcuAccessRegWord(sc, 0xF986, 0xF005);
1438                 MP_WriteMcuAccessRegWord(sc, 0xF988, 0xC5AB);
1439                 MP_WriteMcuAccessRegWord(sc, 0xF98A, 0x74B2);
1440                 MP_WriteMcuAccessRegWord(sc, 0xF98C, 0x49C9);
1441                 MP_WriteMcuAccessRegWord(sc, 0xF98E, 0xF10E);
1442                 MP_WriteMcuAccessRegWord(sc, 0xF990, 0xC5A7);
1443                 MP_WriteMcuAccessRegWord(sc, 0xF992, 0x74A8);
1444                 MP_WriteMcuAccessRegWord(sc, 0xF994, 0x4845);
1445                 MP_WriteMcuAccessRegWord(sc, 0xF996, 0x4846);
1446                 MP_WriteMcuAccessRegWord(sc, 0xF998, 0x4847);
1447                 MP_WriteMcuAccessRegWord(sc, 0xF99A, 0x4848);
1448                 MP_WriteMcuAccessRegWord(sc, 0xF99C, 0x9CA8);
1449                 MP_WriteMcuAccessRegWord(sc, 0xF99E, 0x74B2);
1450                 MP_WriteMcuAccessRegWord(sc, 0xF9A0, 0x4849);
1451                 MP_WriteMcuAccessRegWord(sc, 0xF9A2, 0x9CB2);
1452                 MP_WriteMcuAccessRegWord(sc, 0xF9A4, 0x74A0);
1453                 MP_WriteMcuAccessRegWord(sc, 0xF9A6, 0x484F);
1454                 MP_WriteMcuAccessRegWord(sc, 0xF9A8, 0x9CA0);
1455                 MP_WriteMcuAccessRegWord(sc, 0xF9AA, 0xE0A0);
1456                 MP_WriteMcuAccessRegWord(sc, 0xF9AC, 0x49E4);
1457                 MP_WriteMcuAccessRegWord(sc, 0xF9AE, 0xF018);
1458                 MP_WriteMcuAccessRegWord(sc, 0xF9B0, 0x1D10);
1459                 MP_WriteMcuAccessRegWord(sc, 0xF9B2, 0x8DF4);
1460                 MP_WriteMcuAccessRegWord(sc, 0xF9B4, 0x74F8);
1461                 MP_WriteMcuAccessRegWord(sc, 0xF9B6, 0x74F8);
1462                 MP_WriteMcuAccessRegWord(sc, 0xF9B8, 0x74F8);
1463                 MP_WriteMcuAccessRegWord(sc, 0xF9BA, 0x4843);
1464                 MP_WriteMcuAccessRegWord(sc, 0xF9BC, 0x8CF8);
1465                 MP_WriteMcuAccessRegWord(sc, 0xF9BE, 0x74F8);
1466                 MP_WriteMcuAccessRegWord(sc, 0xF9C0, 0x74F8);
1467                 MP_WriteMcuAccessRegWord(sc, 0xF9C2, 0x74F8);
1468                 MP_WriteMcuAccessRegWord(sc, 0xF9C4, 0x4844);
1469                 MP_WriteMcuAccessRegWord(sc, 0xF9C6, 0x4842);
1470                 MP_WriteMcuAccessRegWord(sc, 0xF9C8, 0x4841);
1471                 MP_WriteMcuAccessRegWord(sc, 0xF9CA, 0x8CF8);
1472                 MP_WriteMcuAccessRegWord(sc, 0xF9CC, 0x1E01);
1473                 MP_WriteMcuAccessRegWord(sc, 0xF9CE, 0xE890);
1474                 MP_WriteMcuAccessRegWord(sc, 0xF9D0, 0x7420);
1475                 MP_WriteMcuAccessRegWord(sc, 0xF9D2, 0x4841);
1476                 MP_WriteMcuAccessRegWord(sc, 0xF9D4, 0x9C20);
1477                 MP_WriteMcuAccessRegWord(sc, 0xF9D6, 0x7444);
1478                 MP_WriteMcuAccessRegWord(sc, 0xF9D8, 0x4848);
1479                 MP_WriteMcuAccessRegWord(sc, 0xF9DA, 0x9C44);
1480                 MP_WriteMcuAccessRegWord(sc, 0xF9DC, 0xE087);
1481                 MP_WriteMcuAccessRegWord(sc, 0xF9DE, 0x49E5);
1482                 MP_WriteMcuAccessRegWord(sc, 0xF9E0, 0xF038);
1483                 MP_WriteMcuAccessRegWord(sc, 0xF9E2, 0x1D20);
1484                 MP_WriteMcuAccessRegWord(sc, 0xF9E4, 0x8DF4);
1485                 MP_WriteMcuAccessRegWord(sc, 0xF9E6, 0x74F8);
1486                 MP_WriteMcuAccessRegWord(sc, 0xF9E8, 0x48C2);
1487                 MP_WriteMcuAccessRegWord(sc, 0xF9EA, 0x4841);
1488                 MP_WriteMcuAccessRegWord(sc, 0xF9EC, 0x8CF8);
1489                 MP_WriteMcuAccessRegWord(sc, 0xF9EE, 0x1E01);
1490                 MP_WriteMcuAccessRegWord(sc, 0xF9F0, 0x7444);
1491                 MP_WriteMcuAccessRegWord(sc, 0xF9F2, 0x49CA);
1492                 MP_WriteMcuAccessRegWord(sc, 0xF9F4, 0xF103);
1493                 MP_WriteMcuAccessRegWord(sc, 0xF9F6, 0x49C2);
1494                 MP_WriteMcuAccessRegWord(sc, 0xF9F8, 0xF00C);
1495                 MP_WriteMcuAccessRegWord(sc, 0xF9FA, 0x49C1);
1496                 MP_WriteMcuAccessRegWord(sc, 0xF9FC, 0xF004);
1497                 MP_WriteMcuAccessRegWord(sc, 0xF9FE, 0x6447);
1498                 MP_WriteMcuAccessRegWord(sc, 0xFA00, 0x2244);
1499                 MP_WriteMcuAccessRegWord(sc, 0xFA02, 0xE002);
1500                 MP_WriteMcuAccessRegWord(sc, 0xFA04, 0x1C01);
1501                 MP_WriteMcuAccessRegWord(sc, 0xFA06, 0x9C62);
1502                 MP_WriteMcuAccessRegWord(sc, 0xFA08, 0x1C11);
1503                 MP_WriteMcuAccessRegWord(sc, 0xFA0A, 0x8C60);
1504                 MP_WriteMcuAccessRegWord(sc, 0xFA0C, 0x1C00);
1505                 MP_WriteMcuAccessRegWord(sc, 0xFA0E, 0x9CF6);
1506                 MP_WriteMcuAccessRegWord(sc, 0xFA10, 0x7444);
1507                 MP_WriteMcuAccessRegWord(sc, 0xFA12, 0x49C8);
1508                 MP_WriteMcuAccessRegWord(sc, 0xFA14, 0xF017);
1509                 MP_WriteMcuAccessRegWord(sc, 0xFA16, 0x74FC);
1510                 MP_WriteMcuAccessRegWord(sc, 0xFA18, 0x49C0);
1511                 MP_WriteMcuAccessRegWord(sc, 0xFA1A, 0xF114);
1512                 MP_WriteMcuAccessRegWord(sc, 0xFA1C, 0x49C1);
1513                 MP_WriteMcuAccessRegWord(sc, 0xFA1E, 0xF112);
1514                 MP_WriteMcuAccessRegWord(sc, 0xFA20, 0x74F8);
1515                 MP_WriteMcuAccessRegWord(sc, 0xFA22, 0x49C0);
1516                 MP_WriteMcuAccessRegWord(sc, 0xFA24, 0xF00F);
1517                 MP_WriteMcuAccessRegWord(sc, 0xFA26, 0x49C6);
1518                 MP_WriteMcuAccessRegWord(sc, 0xFA28, 0xF10D);
1519                 MP_WriteMcuAccessRegWord(sc, 0xFA2A, 0xE86B);
1520                 MP_WriteMcuAccessRegWord(sc, 0xFA2C, 0x48C4);
1521                 MP_WriteMcuAccessRegWord(sc, 0xFA2E, 0x8CF8);
1522                 MP_WriteMcuAccessRegWord(sc, 0xFA30, 0x7420);
1523                 MP_WriteMcuAccessRegWord(sc, 0xFA32, 0x48C1);
1524                 MP_WriteMcuAccessRegWord(sc, 0xFA34, 0x9C20);
1525                 MP_WriteMcuAccessRegWord(sc, 0xFA36, 0x7444);
1526                 MP_WriteMcuAccessRegWord(sc, 0xFA38, 0x48C8);
1527                 MP_WriteMcuAccessRegWord(sc, 0xFA3A, 0x48CA);
1528                 MP_WriteMcuAccessRegWord(sc, 0xFA3C, 0x9C44);
1529                 MP_WriteMcuAccessRegWord(sc, 0xFA3E, 0x48E0);
1530                 MP_WriteMcuAccessRegWord(sc, 0xFA40, 0xE006);
1531                 MP_WriteMcuAccessRegWord(sc, 0xFA42, 0x7444);
1532                 MP_WriteMcuAccessRegWord(sc, 0xFA44, 0x49CA);
1533                 MP_WriteMcuAccessRegWord(sc, 0xFA46, 0xF004);
1534                 MP_WriteMcuAccessRegWord(sc, 0xFA48, 0x48CA);
1535                 MP_WriteMcuAccessRegWord(sc, 0xFA4A, 0x9C44);
1536                 MP_WriteMcuAccessRegWord(sc, 0xFA4C, 0xE851);
1537                 MP_WriteMcuAccessRegWord(sc, 0xFA4E, 0xE04E);
1538                 MP_WriteMcuAccessRegWord(sc, 0xFA50, 0x49E8);
1539                 MP_WriteMcuAccessRegWord(sc, 0xFA52, 0xF020);
1540                 MP_WriteMcuAccessRegWord(sc, 0xFA54, 0x1D01);
1541                 MP_WriteMcuAccessRegWord(sc, 0xFA56, 0x8DF5);
1542                 MP_WriteMcuAccessRegWord(sc, 0xFA58, 0x7440);
1543                 MP_WriteMcuAccessRegWord(sc, 0xFA5A, 0x49C0);
1544                 MP_WriteMcuAccessRegWord(sc, 0xFA5C, 0xF11A);
1545                 MP_WriteMcuAccessRegWord(sc, 0xFA5E, 0x7444);
1546                 MP_WriteMcuAccessRegWord(sc, 0xFA60, 0x49C8);
1547                 MP_WriteMcuAccessRegWord(sc, 0xFA62, 0xF017);
1548                 MP_WriteMcuAccessRegWord(sc, 0xFA64, 0x49CA);
1549                 MP_WriteMcuAccessRegWord(sc, 0xFA66, 0xF115);
1550                 MP_WriteMcuAccessRegWord(sc, 0xFA68, 0x49C0);
1551                 MP_WriteMcuAccessRegWord(sc, 0xFA6A, 0xF103);
1552                 MP_WriteMcuAccessRegWord(sc, 0xFA6C, 0x49C1);
1553                 MP_WriteMcuAccessRegWord(sc, 0xFA6E, 0xF011);
1554                 MP_WriteMcuAccessRegWord(sc, 0xFA70, 0x4849);
1555                 MP_WriteMcuAccessRegWord(sc, 0xFA72, 0x9C44);
1556                 MP_WriteMcuAccessRegWord(sc, 0xFA74, 0x1C00);
1557                 MP_WriteMcuAccessRegWord(sc, 0xFA76, 0x9CF6);
1558                 MP_WriteMcuAccessRegWord(sc, 0xFA78, 0x7444);
1559                 MP_WriteMcuAccessRegWord(sc, 0xFA7A, 0x49C1);
1560                 MP_WriteMcuAccessRegWord(sc, 0xFA7C, 0xF004);
1561                 MP_WriteMcuAccessRegWord(sc, 0xFA7E, 0x6446);
1562                 MP_WriteMcuAccessRegWord(sc, 0xFA80, 0x1E07);
1563                 MP_WriteMcuAccessRegWord(sc, 0xFA82, 0xE003);
1564                 MP_WriteMcuAccessRegWord(sc, 0xFA84, 0x1C01);
1565                 MP_WriteMcuAccessRegWord(sc, 0xFA86, 0x1E03);
1566                 MP_WriteMcuAccessRegWord(sc, 0xFA88, 0x9C62);
1567                 MP_WriteMcuAccessRegWord(sc, 0xFA8A, 0x1C11);
1568                 MP_WriteMcuAccessRegWord(sc, 0xFA8C, 0x8C60);
1569                 MP_WriteMcuAccessRegWord(sc, 0xFA8E, 0xE830);
1570                 MP_WriteMcuAccessRegWord(sc, 0xFA90, 0xE02D);
1571                 MP_WriteMcuAccessRegWord(sc, 0xFA92, 0x49E9);
1572                 MP_WriteMcuAccessRegWord(sc, 0xFA94, 0xF004);
1573                 MP_WriteMcuAccessRegWord(sc, 0xFA96, 0x1D02);
1574                 MP_WriteMcuAccessRegWord(sc, 0xFA98, 0x8DF5);
1575                 MP_WriteMcuAccessRegWord(sc, 0xFA9A, 0xE7A6);
1576                 MP_WriteMcuAccessRegWord(sc, 0xFA9C, 0x49E3);
1577                 MP_WriteMcuAccessRegWord(sc, 0xFA9E, 0xF006);
1578                 MP_WriteMcuAccessRegWord(sc, 0xFAA0, 0x1D08);
1579                 MP_WriteMcuAccessRegWord(sc, 0xFAA2, 0x8DF4);
1580                 MP_WriteMcuAccessRegWord(sc, 0xFAA4, 0x74F8);
1581                 MP_WriteMcuAccessRegWord(sc, 0xFAA6, 0x74F8);
1582                 MP_WriteMcuAccessRegWord(sc, 0xFAA8, 0xE745);
1583                 MP_WriteMcuAccessRegWord(sc, 0xFAAA, 0x49E1);
1584                 MP_WriteMcuAccessRegWord(sc, 0xFAAC, 0xF007);
1585                 MP_WriteMcuAccessRegWord(sc, 0xFAAE, 0x1D02);
1586                 MP_WriteMcuAccessRegWord(sc, 0xFAB0, 0x8DF4);
1587                 MP_WriteMcuAccessRegWord(sc, 0xFAB2, 0x1E01);
1588                 MP_WriteMcuAccessRegWord(sc, 0xFAB4, 0xE7B1);
1589                 MP_WriteMcuAccessRegWord(sc, 0xFAB6, 0xDE20);
1590                 MP_WriteMcuAccessRegWord(sc, 0xFAB8, 0xE410);
1591                 MP_WriteMcuAccessRegWord(sc, 0xFABA, 0x49E0);
1592                 MP_WriteMcuAccessRegWord(sc, 0xFABC, 0xF017);
1593                 MP_WriteMcuAccessRegWord(sc, 0xFABE, 0x1D01);
1594                 MP_WriteMcuAccessRegWord(sc, 0xFAC0, 0x8DF4);
1595                 MP_WriteMcuAccessRegWord(sc, 0xFAC2, 0xC5FA);
1596                 MP_WriteMcuAccessRegWord(sc, 0xFAC4, 0x1C00);
1597                 MP_WriteMcuAccessRegWord(sc, 0xFAC6, 0x8CA0);
1598                 MP_WriteMcuAccessRegWord(sc, 0xFAC8, 0x1C1B);
1599                 MP_WriteMcuAccessRegWord(sc, 0xFACA, 0x9CA2);
1600                 MP_WriteMcuAccessRegWord(sc, 0xFACC, 0x74A2);
1601                 MP_WriteMcuAccessRegWord(sc, 0xFACE, 0x49CF);
1602                 MP_WriteMcuAccessRegWord(sc, 0xFAD0, 0xF0FE);
1603                 MP_WriteMcuAccessRegWord(sc, 0xFAD2, 0xC5F3);
1604                 MP_WriteMcuAccessRegWord(sc, 0xFAD4, 0x74A0);
1605                 MP_WriteMcuAccessRegWord(sc, 0xFAD6, 0x4849);
1606                 MP_WriteMcuAccessRegWord(sc, 0xFAD8, 0x9CA0);
1607                 MP_WriteMcuAccessRegWord(sc, 0xFADA, 0x74F8);
1608                 MP_WriteMcuAccessRegWord(sc, 0xFADC, 0x49C0);
1609                 MP_WriteMcuAccessRegWord(sc, 0xFADE, 0xF006);
1610                 MP_WriteMcuAccessRegWord(sc, 0xFAE0, 0x48C3);
1611                 MP_WriteMcuAccessRegWord(sc, 0xFAE2, 0x8CF8);
1612                 MP_WriteMcuAccessRegWord(sc, 0xFAE4, 0xE81C);
1613                 MP_WriteMcuAccessRegWord(sc, 0xFAE6, 0x74F8);
1614                 MP_WriteMcuAccessRegWord(sc, 0xFAE8, 0x74F8);
1615                 MP_WriteMcuAccessRegWord(sc, 0xFAEA, 0xC42A);
1616                 MP_WriteMcuAccessRegWord(sc, 0xFAEC, 0xBC00);
1617                 MP_WriteMcuAccessRegWord(sc, 0xFAEE, 0xC5E4);
1618                 MP_WriteMcuAccessRegWord(sc, 0xFAF0, 0x74A2);
1619                 MP_WriteMcuAccessRegWord(sc, 0xFAF2, 0x49CE);
1620                 MP_WriteMcuAccessRegWord(sc, 0xFAF4, 0xF1FE);
1621                 MP_WriteMcuAccessRegWord(sc, 0xFAF6, 0x9EA0);
1622                 MP_WriteMcuAccessRegWord(sc, 0xFAF8, 0x1C1C);
1623                 MP_WriteMcuAccessRegWord(sc, 0xFAFA, 0x484F);
1624                 MP_WriteMcuAccessRegWord(sc, 0xFAFC, 0x9CA2);
1625                 MP_WriteMcuAccessRegWord(sc, 0xFAFE, 0xFF80);
1626                 MP_WriteMcuAccessRegWord(sc, 0xFB00, 0xC5DB);
1627                 MP_WriteMcuAccessRegWord(sc, 0xFB02, 0x74A2);
1628                 MP_WriteMcuAccessRegWord(sc, 0xFB04, 0x49CE);
1629                 MP_WriteMcuAccessRegWord(sc, 0xFB06, 0xF1FE);
1630                 MP_WriteMcuAccessRegWord(sc, 0xFB08, 0xC419);
1631                 MP_WriteMcuAccessRegWord(sc, 0xFB0A, 0x9CA0);
1632                 MP_WriteMcuAccessRegWord(sc, 0xFB0C, 0xC416);
1633                 MP_WriteMcuAccessRegWord(sc, 0xFB0E, 0x1C13);
1634                 MP_WriteMcuAccessRegWord(sc, 0xFB10, 0x484F);
1635                 MP_WriteMcuAccessRegWord(sc, 0xFB12, 0x9CA2);
1636                 MP_WriteMcuAccessRegWord(sc, 0xFB14, 0x74A2);
1637                 MP_WriteMcuAccessRegWord(sc, 0xFB16, 0x49CF);
1638                 MP_WriteMcuAccessRegWord(sc, 0xFB18, 0xF1FE);
1639                 MP_WriteMcuAccessRegWord(sc, 0xFB1A, 0xFF80);
1640                 MP_WriteMcuAccessRegWord(sc, 0xFB1C, 0xC5CD);
1641                 MP_WriteMcuAccessRegWord(sc, 0xFB1E, 0x74A2);
1642                 MP_WriteMcuAccessRegWord(sc, 0xFB20, 0x49CE);
1643                 MP_WriteMcuAccessRegWord(sc, 0xFB22, 0xF1FE);
1644                 MP_WriteMcuAccessRegWord(sc, 0xFB24, 0xC40C);
1645                 MP_WriteMcuAccessRegWord(sc, 0xFB26, 0x9CA0);
1646                 MP_WriteMcuAccessRegWord(sc, 0xFB28, 0xC408);
1647                 MP_WriteMcuAccessRegWord(sc, 0xFB2A, 0x1C13);
1648                 MP_WriteMcuAccessRegWord(sc, 0xFB2C, 0x484F);
1649                 MP_WriteMcuAccessRegWord(sc, 0xFB2E, 0x9CA2);
1650                 MP_WriteMcuAccessRegWord(sc, 0xFB30, 0x74A2);
1651                 MP_WriteMcuAccessRegWord(sc, 0xFB32, 0x49CF);
1652                 MP_WriteMcuAccessRegWord(sc, 0xFB34, 0xF1FE);
1653                 MP_WriteMcuAccessRegWord(sc, 0xFB36, 0xFF80);
1654                 MP_WriteMcuAccessRegWord(sc, 0xFB38, 0x0000);
1655                 MP_WriteMcuAccessRegWord(sc, 0xFB3A, 0x0481);
1656                 MP_WriteMcuAccessRegWord(sc, 0xFB3C, 0x0C81);
1657                 MP_WriteMcuAccessRegWord(sc, 0xFB3E, 0x0AE0);
1658
1659                 MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
1660
1661                 MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0000);
1662                 MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0A2F);
1663                 MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0297);
1664                 MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0A61);
1665                 MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x00A9);
1666                 MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x012D);
1667                 MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x0000);
1668                 MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x08DF);
1669                 break;
1670         case MACFG_60:
1671                 DisableMcuBPs(sc);
1672
1673                 MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
1674                 MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE00A);
1675                 MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE00C);
1676                 MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE00E);
1677                 MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE027);
1678                 MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE04F);
1679                 MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE05E);
1680                 MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE065);
1681                 MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC602);
1682                 MP_WriteMcuAccessRegWord(sc, 0xF812, 0xBE00);
1683                 MP_WriteMcuAccessRegWord(sc, 0xF814, 0x0000);
1684                 MP_WriteMcuAccessRegWord(sc, 0xF816, 0xC502);
1685                 MP_WriteMcuAccessRegWord(sc, 0xF818, 0xBD00);
1686                 MP_WriteMcuAccessRegWord(sc, 0xF81A, 0x074C);
1687                 MP_WriteMcuAccessRegWord(sc, 0xF81C, 0xC302);
1688                 MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xBB00);
1689                 MP_WriteMcuAccessRegWord(sc, 0xF820, 0x080A);
1690                 MP_WriteMcuAccessRegWord(sc, 0xF822, 0x6420);
1691                 MP_WriteMcuAccessRegWord(sc, 0xF824, 0x48C2);
1692                 MP_WriteMcuAccessRegWord(sc, 0xF826, 0x8C20);
1693                 MP_WriteMcuAccessRegWord(sc, 0xF828, 0xC516);
1694                 MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x64A4);
1695                 MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x49C0);
1696                 MP_WriteMcuAccessRegWord(sc, 0xF82E, 0xF009);
1697                 MP_WriteMcuAccessRegWord(sc, 0xF830, 0x74A2);
1698                 MP_WriteMcuAccessRegWord(sc, 0xF832, 0x8CA5);
1699                 MP_WriteMcuAccessRegWord(sc, 0xF834, 0x74A0);
1700                 MP_WriteMcuAccessRegWord(sc, 0xF836, 0xC50E);
1701                 MP_WriteMcuAccessRegWord(sc, 0xF838, 0x9CA2);
1702                 MP_WriteMcuAccessRegWord(sc, 0xF83A, 0x1C11);
1703                 MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x9CA0);
1704                 MP_WriteMcuAccessRegWord(sc, 0xF83E, 0xE006);
1705                 MP_WriteMcuAccessRegWord(sc, 0xF840, 0x74F8);
1706                 MP_WriteMcuAccessRegWord(sc, 0xF842, 0x48C4);
1707                 MP_WriteMcuAccessRegWord(sc, 0xF844, 0x8CF8);
1708                 MP_WriteMcuAccessRegWord(sc, 0xF846, 0xC404);
1709                 MP_WriteMcuAccessRegWord(sc, 0xF848, 0xBC00);
1710                 MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xC403);
1711                 MP_WriteMcuAccessRegWord(sc, 0xF84C, 0xBC00);
1712                 MP_WriteMcuAccessRegWord(sc, 0xF84E, 0x0BF2);
1713                 MP_WriteMcuAccessRegWord(sc, 0xF850, 0x0C0A);
1714                 MP_WriteMcuAccessRegWord(sc, 0xF852, 0xE434);
1715                 MP_WriteMcuAccessRegWord(sc, 0xF854, 0xD3C0);
1716                 MP_WriteMcuAccessRegWord(sc, 0xF856, 0x49D9);
1717                 MP_WriteMcuAccessRegWord(sc, 0xF858, 0xF01F);
1718                 MP_WriteMcuAccessRegWord(sc, 0xF85A, 0xC526);
1719                 MP_WriteMcuAccessRegWord(sc, 0xF85C, 0x64A5);
1720                 MP_WriteMcuAccessRegWord(sc, 0xF85E, 0x1400);
1721                 MP_WriteMcuAccessRegWord(sc, 0xF860, 0xF007);
1722                 MP_WriteMcuAccessRegWord(sc, 0xF862, 0x0C01);
1723                 MP_WriteMcuAccessRegWord(sc, 0xF864, 0x8CA5);
1724                 MP_WriteMcuAccessRegWord(sc, 0xF866, 0x1C15);
1725                 MP_WriteMcuAccessRegWord(sc, 0xF868, 0xC51B);
1726                 MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x9CA0);
1727                 MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xE013);
1728                 MP_WriteMcuAccessRegWord(sc, 0xF86E, 0xC519);
1729                 MP_WriteMcuAccessRegWord(sc, 0xF870, 0x74A0);
1730                 MP_WriteMcuAccessRegWord(sc, 0xF872, 0x48C4);
1731                 MP_WriteMcuAccessRegWord(sc, 0xF874, 0x8CA0);
1732                 MP_WriteMcuAccessRegWord(sc, 0xF876, 0xC516);
1733                 MP_WriteMcuAccessRegWord(sc, 0xF878, 0x74A4);
1734                 MP_WriteMcuAccessRegWord(sc, 0xF87A, 0x48C8);
1735                 MP_WriteMcuAccessRegWord(sc, 0xF87C, 0x48CA);
1736                 MP_WriteMcuAccessRegWord(sc, 0xF87E, 0x9CA4);
1737                 MP_WriteMcuAccessRegWord(sc, 0xF880, 0xC512);
1738                 MP_WriteMcuAccessRegWord(sc, 0xF882, 0x1B00);
1739                 MP_WriteMcuAccessRegWord(sc, 0xF884, 0x9BA0);
1740                 MP_WriteMcuAccessRegWord(sc, 0xF886, 0x1B1C);
1741                 MP_WriteMcuAccessRegWord(sc, 0xF888, 0x483F);
1742                 MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x9BA2);
1743                 MP_WriteMcuAccessRegWord(sc, 0xF88C, 0x1B04);
1744                 MP_WriteMcuAccessRegWord(sc, 0xF88E, 0xC508);
1745                 MP_WriteMcuAccessRegWord(sc, 0xF890, 0x9BA0);
1746                 MP_WriteMcuAccessRegWord(sc, 0xF892, 0xC505);
1747                 MP_WriteMcuAccessRegWord(sc, 0xF894, 0xBD00);
1748                 MP_WriteMcuAccessRegWord(sc, 0xF896, 0xC502);
1749                 MP_WriteMcuAccessRegWord(sc, 0xF898, 0xBD00);
1750                 MP_WriteMcuAccessRegWord(sc, 0xF89A, 0x0300);
1751                 MP_WriteMcuAccessRegWord(sc, 0xF89C, 0x051E);
1752                 MP_WriteMcuAccessRegWord(sc, 0xF89E, 0xE434);
1753                 MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0xE018);
1754                 MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0xE092);
1755                 MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0xDE20);
1756                 MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0xD3C0);
1757                 MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0xC50F);
1758                 MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0x76A4);
1759                 MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x49E3);
1760                 MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xF007);
1761                 MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0x49C0);
1762                 MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xF103);
1763                 MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0xC607);
1764                 MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0xBE00);
1765                 MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0xC606);
1766                 MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0xBE00);
1767                 MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0xC602);
1768                 MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0xBE00);
1769                 MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x0C4C);
1770                 MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x0C28);
1771                 MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0x0C2C);
1772                 MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0xDC00);
1773                 MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0xC707);
1774                 MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x1D00);
1775                 MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x8DE2);
1776                 MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0x48C1);
1777                 MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0xC502);
1778                 MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0xBD00);
1779                 MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0x00AA);
1780                 MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0xE0C0);
1781                 MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0xC502);
1782                 MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0xBD00);
1783                 MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0x0132);
1784
1785                 MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
1786
1787                 MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0743);
1788                 MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0801);
1789                 MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0BE9);
1790                 MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x02FD);
1791                 MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0C25);
1792                 MP_WriteMcuAccessRegWord(sc, 0xFC34, 0x00A9);
1793                 MP_WriteMcuAccessRegWord(sc, 0xFC36, 0x012D);
1794                 break;
1795         case MACFG_62:
1796                 DisableMcuBPs(sc);
1797
1798                 MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
1799                 MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE0D3);
1800                 MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE0D6);
1801                 MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE0D9);
1802                 MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE0DB);
1803                 MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE0DD);
1804                 MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE0DF);
1805                 MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE0E1);
1806                 MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC251);
1807                 MP_WriteMcuAccessRegWord(sc, 0xF812, 0x7340);
1808                 MP_WriteMcuAccessRegWord(sc, 0xF814, 0x49B1);
1809                 MP_WriteMcuAccessRegWord(sc, 0xF816, 0xF010);
1810                 MP_WriteMcuAccessRegWord(sc, 0xF818, 0x1D02);
1811                 MP_WriteMcuAccessRegWord(sc, 0xF81A, 0x8D40);
1812                 MP_WriteMcuAccessRegWord(sc, 0xF81C, 0xC202);
1813                 MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xBA00);
1814                 MP_WriteMcuAccessRegWord(sc, 0xF820, 0x2C3A);
1815                 MP_WriteMcuAccessRegWord(sc, 0xF822, 0xC0F0);
1816                 MP_WriteMcuAccessRegWord(sc, 0xF824, 0xE8DE);
1817                 MP_WriteMcuAccessRegWord(sc, 0xF826, 0x2000);
1818                 MP_WriteMcuAccessRegWord(sc, 0xF828, 0x8000);
1819                 MP_WriteMcuAccessRegWord(sc, 0xF82A, 0xC0B6);
1820                 MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x268C);
1821                 MP_WriteMcuAccessRegWord(sc, 0xF82E, 0x752C);
1822                 MP_WriteMcuAccessRegWord(sc, 0xF830, 0x49D4);
1823                 MP_WriteMcuAccessRegWord(sc, 0xF832, 0xF112);
1824                 MP_WriteMcuAccessRegWord(sc, 0xF834, 0xE025);
1825                 MP_WriteMcuAccessRegWord(sc, 0xF836, 0xC2F6);
1826                 MP_WriteMcuAccessRegWord(sc, 0xF838, 0x7146);
1827                 MP_WriteMcuAccessRegWord(sc, 0xF83A, 0xC2F5);
1828                 MP_WriteMcuAccessRegWord(sc, 0xF83C, 0x7340);
1829                 MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x49BE);
1830                 MP_WriteMcuAccessRegWord(sc, 0xF840, 0xF103);
1831                 MP_WriteMcuAccessRegWord(sc, 0xF842, 0xC7F2);
1832                 MP_WriteMcuAccessRegWord(sc, 0xF844, 0xE002);
1833                 MP_WriteMcuAccessRegWord(sc, 0xF846, 0xC7F1);
1834                 MP_WriteMcuAccessRegWord(sc, 0xF848, 0x304F);
1835                 MP_WriteMcuAccessRegWord(sc, 0xF84A, 0x6226);
1836                 MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x49A1);
1837                 MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xF1F0);
1838                 MP_WriteMcuAccessRegWord(sc, 0xF850, 0x7222);
1839                 MP_WriteMcuAccessRegWord(sc, 0xF852, 0x49A0);
1840                 MP_WriteMcuAccessRegWord(sc, 0xF854, 0xF1ED);
1841                 MP_WriteMcuAccessRegWord(sc, 0xF856, 0x2525);
1842                 MP_WriteMcuAccessRegWord(sc, 0xF858, 0x1F28);
1843                 MP_WriteMcuAccessRegWord(sc, 0xF85A, 0x3097);
1844                 MP_WriteMcuAccessRegWord(sc, 0xF85C, 0x3091);
1845                 MP_WriteMcuAccessRegWord(sc, 0xF85E, 0x9A36);
1846                 MP_WriteMcuAccessRegWord(sc, 0xF860, 0x752C);
1847                 MP_WriteMcuAccessRegWord(sc, 0xF862, 0x21DC);
1848                 MP_WriteMcuAccessRegWord(sc, 0xF864, 0x25BC);
1849                 MP_WriteMcuAccessRegWord(sc, 0xF866, 0xC6E2);
1850                 MP_WriteMcuAccessRegWord(sc, 0xF868, 0x77C0);
1851                 MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x1304);
1852                 MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xF014);
1853                 MP_WriteMcuAccessRegWord(sc, 0xF86E, 0x1303);
1854                 MP_WriteMcuAccessRegWord(sc, 0xF870, 0xF014);
1855                 MP_WriteMcuAccessRegWord(sc, 0xF872, 0x1302);
1856                 MP_WriteMcuAccessRegWord(sc, 0xF874, 0xF014);
1857                 MP_WriteMcuAccessRegWord(sc, 0xF876, 0x1301);
1858                 MP_WriteMcuAccessRegWord(sc, 0xF878, 0xF014);
1859                 MP_WriteMcuAccessRegWord(sc, 0xF87A, 0x49D4);
1860                 MP_WriteMcuAccessRegWord(sc, 0xF87C, 0xF103);
1861                 MP_WriteMcuAccessRegWord(sc, 0xF87E, 0xC3D7);
1862                 MP_WriteMcuAccessRegWord(sc, 0xF880, 0xBB00);
1863                 MP_WriteMcuAccessRegWord(sc, 0xF882, 0xC618);
1864                 MP_WriteMcuAccessRegWord(sc, 0xF884, 0x67C6);
1865                 MP_WriteMcuAccessRegWord(sc, 0xF886, 0x752E);
1866                 MP_WriteMcuAccessRegWord(sc, 0xF888, 0x22D7);
1867                 MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x26DD);
1868                 MP_WriteMcuAccessRegWord(sc, 0xF88C, 0x1505);
1869                 MP_WriteMcuAccessRegWord(sc, 0xF88E, 0xF013);
1870                 MP_WriteMcuAccessRegWord(sc, 0xF890, 0xC60A);
1871                 MP_WriteMcuAccessRegWord(sc, 0xF892, 0xBE00);
1872                 MP_WriteMcuAccessRegWord(sc, 0xF894, 0xC309);
1873                 MP_WriteMcuAccessRegWord(sc, 0xF896, 0xBB00);
1874                 MP_WriteMcuAccessRegWord(sc, 0xF898, 0xC308);
1875                 MP_WriteMcuAccessRegWord(sc, 0xF89A, 0xBB00);
1876                 MP_WriteMcuAccessRegWord(sc, 0xF89C, 0xC307);
1877                 MP_WriteMcuAccessRegWord(sc, 0xF89E, 0xBB00);
1878                 MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0xC306);
1879                 MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0xBB00);
1880                 MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0x25C8);
1881                 MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0x25A6);
1882                 MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0x25AC);
1883                 MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0x25B2);
1884                 MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x25B8);
1885                 MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xCD08);
1886                 MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0x0000);
1887                 MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xC0BC);
1888                 MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0xC2FF);
1889                 MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0x7340);
1890                 MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0x49B0);
1891                 MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0xF04E);
1892                 MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0x1F46);
1893                 MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x308F);
1894                 MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0xC3F7);
1895                 MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x1C04);
1896                 MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0xE84D);
1897                 MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0x1401);
1898                 MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0xF147);
1899                 MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x7226);
1900                 MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x49A7);
1901                 MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0xF044);
1902                 MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0x7222);
1903                 MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0x2525);
1904                 MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0x1F30);
1905                 MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0x3097);
1906                 MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0x3091);
1907                 MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x7340);
1908                 MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0xC4EA);
1909                 MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0x401C);
1910                 MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0xF006);
1911                 MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0xC6E8);
1912                 MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0x75C0);
1913                 MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0x49D7);
1914                 MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0xF105);
1915                 MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0xE036);
1916                 MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0x1D08);
1917                 MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0x8DC1);
1918                 MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0x0208);
1919                 MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0x6640);
1920                 MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0x2764);
1921                 MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0x1606);
1922                 MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0xF12F);
1923                 MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x6346);
1924                 MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0x133B);
1925                 MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0xF12C);
1926                 MP_WriteMcuAccessRegWord(sc, 0xF900, 0x9B34);
1927                 MP_WriteMcuAccessRegWord(sc, 0xF902, 0x1B18);
1928                 MP_WriteMcuAccessRegWord(sc, 0xF904, 0x3093);
1929                 MP_WriteMcuAccessRegWord(sc, 0xF906, 0xC32A);
1930                 MP_WriteMcuAccessRegWord(sc, 0xF908, 0x1C10);
1931                 MP_WriteMcuAccessRegWord(sc, 0xF90A, 0xE82A);
1932                 MP_WriteMcuAccessRegWord(sc, 0xF90C, 0x1401);
1933                 MP_WriteMcuAccessRegWord(sc, 0xF90E, 0xF124);
1934                 MP_WriteMcuAccessRegWord(sc, 0xF910, 0x1A36);
1935                 MP_WriteMcuAccessRegWord(sc, 0xF912, 0x308A);
1936                 MP_WriteMcuAccessRegWord(sc, 0xF914, 0x7322);
1937                 MP_WriteMcuAccessRegWord(sc, 0xF916, 0x25B5);
1938                 MP_WriteMcuAccessRegWord(sc, 0xF918, 0x0B0E);
1939                 MP_WriteMcuAccessRegWord(sc, 0xF91A, 0x1C00);
1940                 MP_WriteMcuAccessRegWord(sc, 0xF91C, 0xE82C);
1941                 MP_WriteMcuAccessRegWord(sc, 0xF91E, 0xC71F);
1942                 MP_WriteMcuAccessRegWord(sc, 0xF920, 0x4027);
1943                 MP_WriteMcuAccessRegWord(sc, 0xF922, 0xF11A);
1944                 MP_WriteMcuAccessRegWord(sc, 0xF924, 0xE838);
1945                 MP_WriteMcuAccessRegWord(sc, 0xF926, 0x1F42);
1946                 MP_WriteMcuAccessRegWord(sc, 0xF928, 0x308F);
1947                 MP_WriteMcuAccessRegWord(sc, 0xF92A, 0x1B08);
1948                 MP_WriteMcuAccessRegWord(sc, 0xF92C, 0xE824);
1949                 MP_WriteMcuAccessRegWord(sc, 0xF92E, 0x7236);
1950                 MP_WriteMcuAccessRegWord(sc, 0xF930, 0x7746);
1951                 MP_WriteMcuAccessRegWord(sc, 0xF932, 0x1700);
1952                 MP_WriteMcuAccessRegWord(sc, 0xF934, 0xF00D);
1953                 MP_WriteMcuAccessRegWord(sc, 0xF936, 0xC313);
1954                 MP_WriteMcuAccessRegWord(sc, 0xF938, 0x401F);
1955                 MP_WriteMcuAccessRegWord(sc, 0xF93A, 0xF103);
1956                 MP_WriteMcuAccessRegWord(sc, 0xF93C, 0x1F00);
1957                 MP_WriteMcuAccessRegWord(sc, 0xF93E, 0x9F46);
1958                 MP_WriteMcuAccessRegWord(sc, 0xF940, 0x7744);
1959                 MP_WriteMcuAccessRegWord(sc, 0xF942, 0x449F);
1960                 MP_WriteMcuAccessRegWord(sc, 0xF944, 0x445F);
1961                 MP_WriteMcuAccessRegWord(sc, 0xF946, 0xE817);
1962                 MP_WriteMcuAccessRegWord(sc, 0xF948, 0xC70A);
1963                 MP_WriteMcuAccessRegWord(sc, 0xF94A, 0x4027);
1964                 MP_WriteMcuAccessRegWord(sc, 0xF94C, 0xF105);
1965                 MP_WriteMcuAccessRegWord(sc, 0xF94E, 0xC302);
1966                 MP_WriteMcuAccessRegWord(sc, 0xF950, 0xBB00);
1967                 MP_WriteMcuAccessRegWord(sc, 0xF952, 0x2E08);
1968                 MP_WriteMcuAccessRegWord(sc, 0xF954, 0x2DC2);
1969                 MP_WriteMcuAccessRegWord(sc, 0xF956, 0xC7FF);
1970                 MP_WriteMcuAccessRegWord(sc, 0xF958, 0xBF00);
1971                 MP_WriteMcuAccessRegWord(sc, 0xF95A, 0xCDB8);
1972                 MP_WriteMcuAccessRegWord(sc, 0xF95C, 0xFFFF);
1973                 MP_WriteMcuAccessRegWord(sc, 0xF95E, 0x0C02);
1974                 MP_WriteMcuAccessRegWord(sc, 0xF960, 0xA554);
1975                 MP_WriteMcuAccessRegWord(sc, 0xF962, 0xA5DC);
1976                 MP_WriteMcuAccessRegWord(sc, 0xF964, 0x402F);
1977                 MP_WriteMcuAccessRegWord(sc, 0xF966, 0xF105);
1978                 MP_WriteMcuAccessRegWord(sc, 0xF968, 0x1400);
1979                 MP_WriteMcuAccessRegWord(sc, 0xF96A, 0xF1FA);
1980                 MP_WriteMcuAccessRegWord(sc, 0xF96C, 0x1C01);
1981                 MP_WriteMcuAccessRegWord(sc, 0xF96E, 0xE002);
1982                 MP_WriteMcuAccessRegWord(sc, 0xF970, 0x1C00);
1983                 MP_WriteMcuAccessRegWord(sc, 0xF972, 0xFF80);
1984                 MP_WriteMcuAccessRegWord(sc, 0xF974, 0x49B0);
1985                 MP_WriteMcuAccessRegWord(sc, 0xF976, 0xF004);
1986                 MP_WriteMcuAccessRegWord(sc, 0xF978, 0x0B01);
1987                 MP_WriteMcuAccessRegWord(sc, 0xF97A, 0xA1D3);
1988                 MP_WriteMcuAccessRegWord(sc, 0xF97C, 0xE003);
1989                 MP_WriteMcuAccessRegWord(sc, 0xF97E, 0x0B02);
1990                 MP_WriteMcuAccessRegWord(sc, 0xF980, 0xA5D3);
1991                 MP_WriteMcuAccessRegWord(sc, 0xF982, 0x3127);
1992                 MP_WriteMcuAccessRegWord(sc, 0xF984, 0x3720);
1993                 MP_WriteMcuAccessRegWord(sc, 0xF986, 0x0B02);
1994                 MP_WriteMcuAccessRegWord(sc, 0xF988, 0xA5D3);
1995                 MP_WriteMcuAccessRegWord(sc, 0xF98A, 0x3127);
1996                 MP_WriteMcuAccessRegWord(sc, 0xF98C, 0x3720);
1997                 MP_WriteMcuAccessRegWord(sc, 0xF98E, 0x1300);
1998                 MP_WriteMcuAccessRegWord(sc, 0xF990, 0xF1FB);
1999                 MP_WriteMcuAccessRegWord(sc, 0xF992, 0xFF80);
2000                 MP_WriteMcuAccessRegWord(sc, 0xF994, 0x7322);
2001                 MP_WriteMcuAccessRegWord(sc, 0xF996, 0x25B5);
2002                 MP_WriteMcuAccessRegWord(sc, 0xF998, 0x1E28);
2003                 MP_WriteMcuAccessRegWord(sc, 0xF99A, 0x30DE);
2004                 MP_WriteMcuAccessRegWord(sc, 0xF99C, 0x30D9);
2005                 MP_WriteMcuAccessRegWord(sc, 0xF99E, 0x7264);
2006                 MP_WriteMcuAccessRegWord(sc, 0xF9A0, 0x1E11);
2007                 MP_WriteMcuAccessRegWord(sc, 0xF9A2, 0x2368);
2008                 MP_WriteMcuAccessRegWord(sc, 0xF9A4, 0x3116);
2009                 MP_WriteMcuAccessRegWord(sc, 0xF9A6, 0xFF80);
2010                 MP_WriteMcuAccessRegWord(sc, 0xF9A8, 0x1B7E);
2011                 MP_WriteMcuAccessRegWord(sc, 0xF9AA, 0xC602);
2012                 MP_WriteMcuAccessRegWord(sc, 0xF9AC, 0xBE00);
2013                 MP_WriteMcuAccessRegWord(sc, 0xF9AE, 0x06A6);
2014                 MP_WriteMcuAccessRegWord(sc, 0xF9B0, 0x1B7E);
2015                 MP_WriteMcuAccessRegWord(sc, 0xF9B2, 0xC602);
2016                 MP_WriteMcuAccessRegWord(sc, 0xF9B4, 0xBE00);
2017                 MP_WriteMcuAccessRegWord(sc, 0xF9B6, 0x0764);
2018                 MP_WriteMcuAccessRegWord(sc, 0xF9B8, 0xC602);
2019                 MP_WriteMcuAccessRegWord(sc, 0xF9BA, 0xBE00);
2020                 MP_WriteMcuAccessRegWord(sc, 0xF9BC, 0x0000);
2021                 MP_WriteMcuAccessRegWord(sc, 0xF9BE, 0xC602);
2022                 MP_WriteMcuAccessRegWord(sc, 0xF9C0, 0xBE00);
2023                 MP_WriteMcuAccessRegWord(sc, 0xF9C2, 0x0000);
2024                 MP_WriteMcuAccessRegWord(sc, 0xF9C4, 0xC602);
2025                 MP_WriteMcuAccessRegWord(sc, 0xF9C6, 0xBE00);
2026                 MP_WriteMcuAccessRegWord(sc, 0xF9C8, 0x0000);
2027                 MP_WriteMcuAccessRegWord(sc, 0xF9CA, 0xC602);
2028                 MP_WriteMcuAccessRegWord(sc, 0xF9CC, 0xBE00);
2029                 MP_WriteMcuAccessRegWord(sc, 0xF9CE, 0x0000);
2030                 MP_WriteMcuAccessRegWord(sc, 0xF9D0, 0xC602);
2031                 MP_WriteMcuAccessRegWord(sc, 0xF9D2, 0xBE00);
2032                 MP_WriteMcuAccessRegWord(sc, 0xF9D4, 0x0000);
2033
2034                 MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
2035
2036                 MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x2549);
2037                 MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x06A5);
2038                 MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x0763);
2039                 break;
2040         case MACFG_67:
2041                 DisableMcuBPs(sc);
2042
2043                 MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
2044                 MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE017);
2045                 MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE019);
2046                 MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE01B);
2047                 MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE01D);
2048                 MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE01F);
2049                 MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE021);
2050                 MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE023);
2051                 MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC50F);
2052                 MP_WriteMcuAccessRegWord(sc, 0xF812, 0x76A4);
2053                 MP_WriteMcuAccessRegWord(sc, 0xF814, 0x49E3);
2054                 MP_WriteMcuAccessRegWord(sc, 0xF816, 0xF007);
2055                 MP_WriteMcuAccessRegWord(sc, 0xF818, 0x49C0);
2056                 MP_WriteMcuAccessRegWord(sc, 0xF81A, 0xF103);
2057                 MP_WriteMcuAccessRegWord(sc, 0xF81C, 0xC607);
2058                 MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xBE00);
2059                 MP_WriteMcuAccessRegWord(sc, 0xF820, 0xC606);
2060                 MP_WriteMcuAccessRegWord(sc, 0xF822, 0xBE00);
2061                 MP_WriteMcuAccessRegWord(sc, 0xF824, 0xC602);
2062                 MP_WriteMcuAccessRegWord(sc, 0xF826, 0xBE00);
2063                 MP_WriteMcuAccessRegWord(sc, 0xF828, 0x0BDA);
2064                 MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x0BB0);
2065                 MP_WriteMcuAccessRegWord(sc, 0xF82C, 0x0BBA);
2066                 MP_WriteMcuAccessRegWord(sc, 0xF82E, 0xDC00);
2067                 MP_WriteMcuAccessRegWord(sc, 0xF830, 0xC602);
2068                 MP_WriteMcuAccessRegWord(sc, 0xF832, 0xBE00);
2069                 MP_WriteMcuAccessRegWord(sc, 0xF834, 0x0000);
2070                 MP_WriteMcuAccessRegWord(sc, 0xF836, 0xC602);
2071                 MP_WriteMcuAccessRegWord(sc, 0xF838, 0xBE00);
2072                 MP_WriteMcuAccessRegWord(sc, 0xF83A, 0x0000);
2073                 MP_WriteMcuAccessRegWord(sc, 0xF83C, 0xC602);
2074                 MP_WriteMcuAccessRegWord(sc, 0xF83E, 0xBE00);
2075                 MP_WriteMcuAccessRegWord(sc, 0xF840, 0x0000);
2076                 MP_WriteMcuAccessRegWord(sc, 0xF842, 0xC602);
2077                 MP_WriteMcuAccessRegWord(sc, 0xF844, 0xBE00);
2078                 MP_WriteMcuAccessRegWord(sc, 0xF846, 0x0000);
2079                 MP_WriteMcuAccessRegWord(sc, 0xF848, 0xC602);
2080                 MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xBE00);
2081                 MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x0000);
2082                 MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xC602);
2083                 MP_WriteMcuAccessRegWord(sc, 0xF850, 0xBE00);
2084                 MP_WriteMcuAccessRegWord(sc, 0xF852, 0x0000);
2085                 MP_WriteMcuAccessRegWord(sc, 0xF854, 0xC602);
2086                 MP_WriteMcuAccessRegWord(sc, 0xF856, 0xBE00);
2087                 MP_WriteMcuAccessRegWord(sc, 0xF858, 0x0000);
2088
2089                 MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
2090
2091                 MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x0BB3);
2092                 break;
2093         case MACFG_68:
2094         case MACFG_69:
2095                 DisableMcuBPs(sc);
2096
2097                 MP_WriteMcuAccessRegWord(sc, 0xF800, 0xE008);
2098                 MP_WriteMcuAccessRegWord(sc, 0xF802, 0xE00F);
2099                 MP_WriteMcuAccessRegWord(sc, 0xF804, 0xE011);
2100                 MP_WriteMcuAccessRegWord(sc, 0xF806, 0xE047);
2101                 MP_WriteMcuAccessRegWord(sc, 0xF808, 0xE049);
2102                 MP_WriteMcuAccessRegWord(sc, 0xF80A, 0xE073);
2103                 MP_WriteMcuAccessRegWord(sc, 0xF80C, 0xE075);
2104                 MP_WriteMcuAccessRegWord(sc, 0xF80E, 0xE077);
2105                 MP_WriteMcuAccessRegWord(sc, 0xF810, 0xC707);
2106                 MP_WriteMcuAccessRegWord(sc, 0xF812, 0x1D00);
2107                 MP_WriteMcuAccessRegWord(sc, 0xF814, 0x8DE2);
2108                 MP_WriteMcuAccessRegWord(sc, 0xF816, 0x48C1);
2109                 MP_WriteMcuAccessRegWord(sc, 0xF818, 0xC502);
2110                 MP_WriteMcuAccessRegWord(sc, 0xF81A, 0xBD00);
2111                 MP_WriteMcuAccessRegWord(sc, 0xF81C, 0x00E4);
2112                 MP_WriteMcuAccessRegWord(sc, 0xF81E, 0xE0C0);
2113                 MP_WriteMcuAccessRegWord(sc, 0xF820, 0xC502);
2114                 MP_WriteMcuAccessRegWord(sc, 0xF822, 0xBD00);
2115                 MP_WriteMcuAccessRegWord(sc, 0xF824, 0x0216);
2116                 MP_WriteMcuAccessRegWord(sc, 0xF826, 0xC634);
2117                 MP_WriteMcuAccessRegWord(sc, 0xF828, 0x75C0);
2118                 MP_WriteMcuAccessRegWord(sc, 0xF82A, 0x49D3);
2119                 MP_WriteMcuAccessRegWord(sc, 0xF82C, 0xF027);
2120                 MP_WriteMcuAccessRegWord(sc, 0xF82E, 0xC631);
2121                 MP_WriteMcuAccessRegWord(sc, 0xF830, 0x75C0);
2122                 MP_WriteMcuAccessRegWord(sc, 0xF832, 0x49D3);
2123                 MP_WriteMcuAccessRegWord(sc, 0xF834, 0xF123);
2124                 MP_WriteMcuAccessRegWord(sc, 0xF836, 0xC627);
2125                 MP_WriteMcuAccessRegWord(sc, 0xF838, 0x75C0);
2126                 MP_WriteMcuAccessRegWord(sc, 0xF83A, 0xB405);
2127                 MP_WriteMcuAccessRegWord(sc, 0xF83C, 0xC525);
2128                 MP_WriteMcuAccessRegWord(sc, 0xF83E, 0x9DC0);
2129                 MP_WriteMcuAccessRegWord(sc, 0xF840, 0xC621);
2130                 MP_WriteMcuAccessRegWord(sc, 0xF842, 0x75C8);
2131                 MP_WriteMcuAccessRegWord(sc, 0xF844, 0x49D5);
2132                 MP_WriteMcuAccessRegWord(sc, 0xF846, 0xF00A);
2133                 MP_WriteMcuAccessRegWord(sc, 0xF848, 0x49D6);
2134                 MP_WriteMcuAccessRegWord(sc, 0xF84A, 0xF008);
2135                 MP_WriteMcuAccessRegWord(sc, 0xF84C, 0x49D7);
2136                 MP_WriteMcuAccessRegWord(sc, 0xF84E, 0xF006);
2137                 MP_WriteMcuAccessRegWord(sc, 0xF850, 0x49D8);
2138                 MP_WriteMcuAccessRegWord(sc, 0xF852, 0xF004);
2139                 MP_WriteMcuAccessRegWord(sc, 0xF854, 0x75D2);
2140                 MP_WriteMcuAccessRegWord(sc, 0xF856, 0x49D9);
2141                 MP_WriteMcuAccessRegWord(sc, 0xF858, 0xF111);
2142                 MP_WriteMcuAccessRegWord(sc, 0xF85A, 0xC517);
2143                 MP_WriteMcuAccessRegWord(sc, 0xF85C, 0x9DC8);
2144                 MP_WriteMcuAccessRegWord(sc, 0xF85E, 0xC516);
2145                 MP_WriteMcuAccessRegWord(sc, 0xF860, 0x9DD2);
2146                 MP_WriteMcuAccessRegWord(sc, 0xF862, 0xC618);
2147                 MP_WriteMcuAccessRegWord(sc, 0xF864, 0x75C0);
2148                 MP_WriteMcuAccessRegWord(sc, 0xF866, 0x49D4);
2149                 MP_WriteMcuAccessRegWord(sc, 0xF868, 0xF003);
2150                 MP_WriteMcuAccessRegWord(sc, 0xF86A, 0x49D0);
2151                 MP_WriteMcuAccessRegWord(sc, 0xF86C, 0xF104);
2152                 MP_WriteMcuAccessRegWord(sc, 0xF86E, 0xC60A);
2153                 MP_WriteMcuAccessRegWord(sc, 0xF870, 0xC50E);
2154                 MP_WriteMcuAccessRegWord(sc, 0xF872, 0x9DC0);
2155                 MP_WriteMcuAccessRegWord(sc, 0xF874, 0xB005);
2156                 MP_WriteMcuAccessRegWord(sc, 0xF876, 0xC607);
2157                 MP_WriteMcuAccessRegWord(sc, 0xF878, 0x9DC0);
2158                 MP_WriteMcuAccessRegWord(sc, 0xF87A, 0xB007);
2159                 MP_WriteMcuAccessRegWord(sc, 0xF87C, 0xC602);
2160                 MP_WriteMcuAccessRegWord(sc, 0xF87E, 0xBE00);
2161                 MP_WriteMcuAccessRegWord(sc, 0xF880, 0x1A06);
2162                 MP_WriteMcuAccessRegWord(sc, 0xF882, 0xB400);
2163                 MP_WriteMcuAccessRegWord(sc, 0xF884, 0xE86C);
2164                 MP_WriteMcuAccessRegWord(sc, 0xF886, 0xA000);
2165                 MP_WriteMcuAccessRegWord(sc, 0xF888, 0x01E1);
2166                 MP_WriteMcuAccessRegWord(sc, 0xF88A, 0x0200);
2167                 MP_WriteMcuAccessRegWord(sc, 0xF88C, 0x9200);
2168                 MP_WriteMcuAccessRegWord(sc, 0xF88E, 0xE84C);
2169                 MP_WriteMcuAccessRegWord(sc, 0xF890, 0xE004);
2170                 MP_WriteMcuAccessRegWord(sc, 0xF892, 0xE908);
2171                 MP_WriteMcuAccessRegWord(sc, 0xF894, 0xC502);
2172                 MP_WriteMcuAccessRegWord(sc, 0xF896, 0xBD00);
2173                 MP_WriteMcuAccessRegWord(sc, 0xF898, 0x0B58);
2174                 MP_WriteMcuAccessRegWord(sc, 0xF89A, 0xB407);
2175                 MP_WriteMcuAccessRegWord(sc, 0xF89C, 0xB404);
2176                 MP_WriteMcuAccessRegWord(sc, 0xF89E, 0x2195);
2177                 MP_WriteMcuAccessRegWord(sc, 0xF8A0, 0x25BD);
2178                 MP_WriteMcuAccessRegWord(sc, 0xF8A2, 0x9BE0);
2179                 MP_WriteMcuAccessRegWord(sc, 0xF8A4, 0x1C1C);
2180                 MP_WriteMcuAccessRegWord(sc, 0xF8A6, 0x484F);
2181                 MP_WriteMcuAccessRegWord(sc, 0xF8A8, 0x9CE2);
2182                 MP_WriteMcuAccessRegWord(sc, 0xF8AA, 0x72E2);
2183                 MP_WriteMcuAccessRegWord(sc, 0xF8AC, 0x49AE);
2184                 MP_WriteMcuAccessRegWord(sc, 0xF8AE, 0xF1FE);
2185                 MP_WriteMcuAccessRegWord(sc, 0xF8B0, 0x0B00);
2186                 MP_WriteMcuAccessRegWord(sc, 0xF8B2, 0xF116);
2187                 MP_WriteMcuAccessRegWord(sc, 0xF8B4, 0xC71C);
2188                 MP_WriteMcuAccessRegWord(sc, 0xF8B6, 0xC419);
2189                 MP_WriteMcuAccessRegWord(sc, 0xF8B8, 0x9CE0);
2190                 MP_WriteMcuAccessRegWord(sc, 0xF8BA, 0x1C13);
2191                 MP_WriteMcuAccessRegWord(sc, 0xF8BC, 0x484F);
2192                 MP_WriteMcuAccessRegWord(sc, 0xF8BE, 0x9CE2);
2193                 MP_WriteMcuAccessRegWord(sc, 0xF8C0, 0x74E2);
2194                 MP_WriteMcuAccessRegWord(sc, 0xF8C2, 0x49CE);
2195                 MP_WriteMcuAccessRegWord(sc, 0xF8C4, 0xF1FE);
2196                 MP_WriteMcuAccessRegWord(sc, 0xF8C6, 0xC412);
2197                 MP_WriteMcuAccessRegWord(sc, 0xF8C8, 0x9CE0);
2198                 MP_WriteMcuAccessRegWord(sc, 0xF8CA, 0x1C13);
2199                 MP_WriteMcuAccessRegWord(sc, 0xF8CC, 0x484F);
2200                 MP_WriteMcuAccessRegWord(sc, 0xF8CE, 0x9CE2);
2201                 MP_WriteMcuAccessRegWord(sc, 0xF8D0, 0x74E2);
2202                 MP_WriteMcuAccessRegWord(sc, 0xF8D2, 0x49CE);
2203                 MP_WriteMcuAccessRegWord(sc, 0xF8D4, 0xF1FE);
2204                 MP_WriteMcuAccessRegWord(sc, 0xF8D6, 0xC70C);
2205                 MP_WriteMcuAccessRegWord(sc, 0xF8D8, 0x74F8);
2206                 MP_WriteMcuAccessRegWord(sc, 0xF8DA, 0x48C3);
2207                 MP_WriteMcuAccessRegWord(sc, 0xF8DC, 0x8CF8);
2208                 MP_WriteMcuAccessRegWord(sc, 0xF8DE, 0xB004);
2209                 MP_WriteMcuAccessRegWord(sc, 0xF8E0, 0xB007);
2210                 MP_WriteMcuAccessRegWord(sc, 0xF8E2, 0xC502);
2211                 MP_WriteMcuAccessRegWord(sc, 0xF8E4, 0xBD00);
2212                 MP_WriteMcuAccessRegWord(sc, 0xF8E6, 0x0F24);
2213                 MP_WriteMcuAccessRegWord(sc, 0xF8E8, 0x0481);
2214                 MP_WriteMcuAccessRegWord(sc, 0xF8EA, 0x0C81);
2215                 MP_WriteMcuAccessRegWord(sc, 0xF8EC, 0xDE24);
2216                 MP_WriteMcuAccessRegWord(sc, 0xF8EE, 0xE000);
2217                 MP_WriteMcuAccessRegWord(sc, 0xF8F0, 0xC602);
2218                 MP_WriteMcuAccessRegWord(sc, 0xF8F2, 0xBE00);
2219                 MP_WriteMcuAccessRegWord(sc, 0xF8F4, 0x0CA4);
2220                 MP_WriteMcuAccessRegWord(sc, 0xF8F6, 0xC502);
2221                 MP_WriteMcuAccessRegWord(sc, 0xF8F8, 0xBD00);
2222                 MP_WriteMcuAccessRegWord(sc, 0xF8FA, 0x0000);
2223                 MP_WriteMcuAccessRegWord(sc, 0xF8FC, 0xC602);
2224                 MP_WriteMcuAccessRegWord(sc, 0xF8FE, 0xBE00);
2225                 MP_WriteMcuAccessRegWord(sc, 0xF900, 0x0000);
2226
2227                 MP_WriteMcuAccessRegWord(sc, 0xFC26, 0x8000);
2228
2229                 MP_WriteMcuAccessRegWord(sc, 0xFC28, 0x00E2);
2230                 MP_WriteMcuAccessRegWord(sc, 0xFC2A, 0x0210);
2231                 MP_WriteMcuAccessRegWord(sc, 0xFC2C, 0x1A04);
2232                 MP_WriteMcuAccessRegWord(sc, 0xFC2E, 0x0B26);
2233                 MP_WriteMcuAccessRegWord(sc, 0xFC30, 0x0F02);
2234                 MP_WriteMcuAccessRegWord(sc, 0xFC32, 0x0CA0);
2235
2236                 if (sc->re_device_id == RT_DEVICEID_8136)
2237                         MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x0033);
2238                 else
2239                         MP_WriteMcuAccessRegWord(sc, 0xFC38, 0x003F);
2240
2241                 break;
2242         }
2243 }
2244
2245 #define ISRIMR_DASH_TYPE2_TX_DISABLE_IDLE BIT_5
2246 static void Dash2DisableTx(struct re_softc *sc)
2247 {
2248         //if (!re_check_dash(sc)) return;
2249
2250         if (sc->re_type == MACFG_61 || sc->re_type == MACFG_62 ||
2251             sc->re_type == MACFG_67) {
2252                 u_int16_t WaitCnt;
2253                 u_int8_t TmpUchar;
2254
2255                 //Disable oob Tx
2256                 CSR_WRITE_1(sc, RE_IBCR2, CSR_READ_1(sc, RE_IBCR2) & ~(BIT_0));
2257                 WaitCnt = 0;
2258
2259                 //wait oob tx disable
2260                 do {
2261                         TmpUchar = CSR_READ_1(sc, RE_IBISR0);
2262
2263                         if (TmpUchar & ISRIMR_DASH_TYPE2_TX_DISABLE_IDLE) {
2264                                 break;
2265                         }
2266
2267                         DELAY(50);
2268                         WaitCnt++;
2269                 } while(WaitCnt < 2000);
2270
2271                 //Clear ISRIMR_DASH_TYPE2_TX_DISABLE_IDLE
2272                 CSR_WRITE_1(sc, RE_IBISR0, CSR_READ_1(sc, RE_IBISR0) | ISRIMR_DASH_TYPE2_TX_DISABLE_IDLE);
2273         }
2274 }
2275
2276 static void Dash2DisableRx(struct re_softc *sc)
2277 {
2278         //if (!re_check_dash(sc)) return;
2279
2280         if (sc->re_type == MACFG_61 || sc->re_type == MACFG_62 ||
2281             sc->re_type == MACFG_67)
2282                 CSR_WRITE_1(sc, RE_IBCR0, CSR_READ_1(sc, RE_IBCR0) & ~(BIT_0));
2283 }
2284
2285 static void Dash2DisableTxRx(struct re_softc *sc)
2286 {
2287         if (sc->re_type == MACFG_61 || sc->re_type == MACFG_62 ||
2288             sc->re_type == MACFG_67) {
2289                 Dash2DisableTx(sc);
2290                 Dash2DisableRx(sc);
2291         }
2292 }
2293
2294 static void re_disable_now_is_oob(struct re_softc *sc)
2295 {
2296         if (sc->re_hw_supp_now_is_oob_ver == 1)
2297                 CSR_WRITE_1(sc, RE_MCU_CMD, CSR_READ_1(sc, RE_MCU_CMD) & ~RE_NOW_IS_OOB);
2298 }
2299
2300 static void re_exit_oob(struct re_softc *sc)
2301 {
2302         u_int16_t data16;
2303         int i;
2304
2305         CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_OFF);
2306
2307         switch(sc->re_type) {
2308         case MACFG_61:
2309         case MACFG_62:
2310         case MACFG_67:
2311                 Dash2DisableTxRx(sc);
2312                 break;
2313         }
2314
2315         switch(sc->re_type) {
2316         case MACFG_61:
2317         case MACFG_62:
2318         case MACFG_67:
2319         case MACFG_63:
2320         case MACFG_64:
2321         case MACFG_65:
2322         case MACFG_66:
2323                 re_driver_start(sc);
2324                 break;
2325         }
2326
2327         switch(sc->re_type) {
2328         case MACFG_56:
2329         case MACFG_57:
2330         case MACFG_58:
2331         case MACFG_59:
2332         case MACFG_60:
2333         case MACFG_61:
2334         case MACFG_62:
2335         case MACFG_67:
2336         case MACFG_68:
2337         case MACFG_69:
2338                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_3);
2339                 DELAY(2000);
2340
2341                 for (i = 0; i < 10; i++) {
2342                         DELAY(100);
2343                         if (CSR_READ_4(sc, RE_TXCFG) & BIT_11)
2344                                 break;
2345                 }
2346
2347                 if (CSR_READ_1(sc, RE_COMMAND) & (RE_CMD_TX_ENB | RE_CMD_RX_ENB)) {
2348                         DELAY(100);
2349                         CSR_WRITE_1(sc, RE_COMMAND, CSR_READ_1(sc, RE_COMMAND) & ~(RE_CMD_TX_ENB | RE_CMD_RX_ENB));
2350                 }
2351
2352                 for (i = 0; i < 10; i++) {
2353                         DELAY(100);
2354                         if ((CSR_READ_1(sc, RE_MCU_CMD) & (RE_TXFIFO_EMPTY | RE_RXFIFO_EMPTY)) == (RE_TXFIFO_EMPTY | RE_RXFIFO_EMPTY))
2355                                 break;
2356
2357                 }
2358                 break;
2359         }
2360
2361         //Disable realwow function
2362         switch (sc->re_type) {
2363         case MACFG_50:
2364         case MACFG_51:
2365                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE5A90000);
2366                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xF2100010);
2367                 break;
2368         case MACFG_52:
2369                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE5A90000);
2370                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE4640000);
2371                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xF2100010);
2372                 break;
2373         case MACFG_56:
2374         case MACFG_57:
2375                 CSR_WRITE_4(sc, RE_MCUACCESS, 0x605E0000);
2376                 CSR_WRITE_4(sc, RE_MCUACCESS, (0xE05E << 16) | (CSR_READ_4(sc, RE_MCUACCESS) & 0xFFFE));
2377                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE9720000);
2378                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xF2140010);
2379                 break;
2380         case MACFG_60:
2381                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE05E00FF);
2382                 CSR_WRITE_4(sc, RE_MCUACCESS, 0xE9720000);
2383                 MP_WriteMcuAccessRegWord(sc, 0xE428, 0x0010);
2384                 break;
2385         }
2386
2387         if (sc->re_hw_supp_now_is_oob_ver >0)
2388                 re_disable_now_is_oob(sc);
2389
2390         switch(sc->re_type) {
2391         case MACFG_52:
2392                 for (i = 0; i < 10; i++) {
2393                         DELAY(100);
2394                         if (CSR_READ_2(sc, 0xD2) & BIT_9)
2395                                 break;
2396                 }
2397
2398                 data16 = MP_ReadMcuAccessRegWord(sc, 0xD4DE) | BIT_15;
2399                 MP_WriteMcuAccessRegWord(sc, 0xD4DE, data16);
2400
2401                 for (i = 0; i < 10; i++) {
2402                         DELAY(100);
2403                         if (CSR_READ_2(sc, 0xD2) & BIT_9)
2404                                 break;
2405                 }
2406                 break;
2407         case MACFG_56:
2408         case MACFG_57:
2409         case MACFG_58:
2410         case MACFG_59:
2411         case MACFG_60:
2412         case MACFG_61:
2413         case MACFG_62:
2414         case MACFG_67:
2415         case MACFG_68:
2416         case MACFG_69:
2417                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE8DE) & ~BIT_14;
2418                 MP_WriteMcuAccessRegWord(sc, 0xE8DE, data16);
2419                 for (i = 0; i < 10; i++) {
2420                         DELAY(100);
2421                         if (CSR_READ_2(sc, 0xD2) & BIT_9)
2422                                 break;
2423                 }
2424
2425                 data16 = MP_ReadMcuAccessRegWord(sc, 0xE8DE) | BIT_15;
2426                 MP_WriteMcuAccessRegWord(sc, 0xE8DE, data16);
2427
2428                 for (i = 0; i < 10; i++) {
2429                         DELAY(100);
2430                         if (CSR_READ_2(sc, 0xD2) & BIT_9)
2431                                 break;
2432                 }
2433                 break;
2434         }
2435
2436         //wait ups resume (phy state 2)
2437         switch(sc->re_type) {
2438         case MACFG_68:
2439         case MACFG_69:
2440                 if (re_is_ups_resume(sc)) {
2441                         re_wait_phy_ups_resume(sc, 2);
2442                         re_clear_ups_resume_bit(sc);
2443                 }
2444                 break;
2445         };
2446
2447         /*
2448         * Config MAC MCU
2449         */
2450         re_hw_mac_mcu_config(sc);
2451 }
2452
2453 static void re_hw_init(struct re_softc *sc)
2454 {
2455         /*
2456         * disable EDT.
2457         */
2458         switch(sc->re_type) {
2459         case MACFG_16:
2460         case MACFG_17:
2461         case MACFG_18:
2462         case MACFG_19:
2463         case MACFG_41:
2464                 CSR_WRITE_1(sc, 0xF4, CSR_READ_1(sc, 0xF4) & ~(BIT_0|BIT_1));
2465                 break;
2466         case MACFG_36:
2467         case MACFG_37:
2468         case MACFG_38:
2469         case MACFG_39:
2470         case MACFG_42:
2471         case MACFG_43:
2472         case MACFG_50:
2473         case MACFG_51:
2474         case MACFG_54:
2475         case MACFG_55:
2476                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~(BIT_0|BIT_1|BIT_2));
2477                 break;
2478         }
2479
2480         switch(sc->re_type) {
2481         case MACFG_5:
2482                 if (CSR_READ_1(sc, RE_CFG2) & 1) {
2483                         CSR_WRITE_4(sc, 0x7C, 0x000FFFFF);
2484                 } else {
2485                         CSR_WRITE_4(sc, 0x7C, 0x000FFF00);
2486                 }
2487                 break;
2488         case MACFG_6:
2489                 if (CSR_READ_1(sc, RE_CFG2) & 1) {
2490                         CSR_WRITE_4(sc, 0x7C, 0x003FFFFF);
2491                 } else {
2492                         CSR_WRITE_4(sc, 0x7C, 0x003FFF00);
2493                 }
2494                 break;
2495         }
2496
2497         switch(sc->re_type) {
2498         case MACFG_33:
2499         case MACFG_36:
2500         case MACFG_37:
2501                 CSR_WRITE_1(sc, 0xF3, CSR_READ_1(sc, 0xF3) | BIT_2);
2502                 break;
2503         }
2504
2505         switch(sc->re_type) {
2506         case MACFG_36:
2507         case MACFG_37:
2508         case MACFG_38:
2509         case MACFG_39:
2510         case MACFG_42:
2511         case MACFG_43:
2512         case MACFG_50:
2513         case MACFG_51:
2514         case MACFG_52:
2515         case MACFG_53:
2516         case MACFG_54:
2517         case MACFG_55:
2518         case MACFG_56:
2519         case MACFG_57:
2520         case MACFG_58:
2521         case MACFG_59:
2522         case MACFG_60:
2523         case MACFG_61:
2524         case MACFG_62:
2525         case MACFG_67:
2526         case MACFG_68:
2527         case MACFG_69:
2528                 CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_WRITECFG);
2529                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) & ~BIT_0);
2530                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) & ~BIT_7);
2531                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_5);
2532                 CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_OFF);
2533                 break;
2534         }
2535
2536         if (sc->re_if_flags & RL_FLAG_PCIE) {
2537                 uint32_t Data32;
2538                 //Set PCIE uncorrectable error status mask pcie 0x108
2539                 Data32 = MP_ReadPciEConfigSpace(sc, 0xF108);
2540                 Data32 |= BIT_20;
2541                 MP_WritePciEConfigSpace(sc, 0xF108, Data32);
2542         }
2543 }
2544
2545 static void re_get_hw_mac_address(struct re_softc *sc, u_int8_t *eaddr)
2546 {
2547         u_int16_t re_eeid = 0;
2548         u_int8_t read_from_macio = 0;
2549         int i;
2550
2551         switch(sc->re_type) {
2552         case MACFG_50:
2553         case MACFG_51:
2554         case MACFG_52:
2555         case MACFG_53:
2556         case MACFG_56:
2557         case MACFG_57:
2558         case MACFG_58:
2559         case MACFG_59:
2560         case MACFG_60:
2561         case MACFG_61:
2562         case MACFG_62:
2563         case MACFG_67:
2564         case MACFG_68:
2565         case MACFG_69:
2566                 *(u_int32_t *)&eaddr[0]= re_eri_read(sc, 0xE0, 4, ERIAR_ExGMAC);
2567                 *(u_int16_t *)&eaddr[4] = (u_int16_t)re_eri_read(sc, 0xE4, 4, ERIAR_ExGMAC);
2568                 break;
2569         case MACFG_63:
2570         case MACFG_64:
2571         case MACFG_65:
2572         case MACFG_66:
2573                 read_from_macio = 1;
2574                 break;
2575         default:
2576                 re_read_eeprom(sc, (caddr_t)&re_eeid, RE_EE_ID, 1, 0);
2577                 if (re_eeid == 0x8129)
2578                         re_read_eeprom(sc, (caddr_t)&eaddr[0], RE_EE_EADDR, 3, 0);
2579                 else
2580                         read_from_macio = 1;
2581                 break;
2582         }
2583
2584         if (eaddr[0] == 0x00 &&
2585             eaddr[1] == 0x00 &&
2586             eaddr[2] == 0x00 &&
2587             eaddr[3] == 0x00 &&
2588             eaddr[4] == 0x00 &&
2589             eaddr[5] == 0x00) {
2590                 read_from_macio = 1;
2591         }
2592
2593         if (eaddr[0] == 0xFF &&
2594             eaddr[1] == 0xFF &&
2595             eaddr[2] == 0xFF &&
2596             eaddr[3] == 0xFF &&
2597             eaddr[4] == 0xFF &&
2598             eaddr[5] == 0xFF) {
2599                 read_from_macio = 1;
2600         }
2601
2602         if (read_from_macio) {
2603                 for (i = 0; i < ETHER_ADDR_LEN; i++)
2604                         eaddr[i] = CSR_READ_1(sc, RE_IDR0 + i);
2605         }
2606
2607         switch (sc->re_type) {
2608         case MACFG_36:
2609         case MACFG_37:
2610         case MACFG_42:
2611         case MACFG_43:
2612         case MACFG_54:
2613         case MACFG_55:
2614                 for (i = 0; i < ETHER_ADDR_LEN; i++)
2615                         CSR_WRITE_1(sc, RE_SecMAC0 + i, eaddr[i]);
2616                 break;
2617         }
2618 }
2619
2620 static int re_check_mac_version(struct re_softc *sc)
2621 {
2622         device_t dev = sc->dev;
2623         int error = 0;
2624
2625         switch(CSR_READ_4(sc, RE_TXCFG) & 0xFCF00000) {
2626         case 0x00800000:
2627         case 0x04000000:
2628                 sc->re_type = MACFG_3;
2629                 sc->max_jumbo_frame_size = Jumbo_Frame_7k;
2630                 CSR_WRITE_4(sc, RE_RXCFG, 0xFF00);
2631                 break;
2632         case 0x10000000:
2633                 sc->re_type = MACFG_4;
2634                 sc->max_jumbo_frame_size = Jumbo_Frame_7k;
2635                 CSR_WRITE_4(sc, RE_RXCFG, 0xFF00);
2636                 break;
2637         case 0x18000000:
2638                 sc->re_type = MACFG_5;
2639                 sc->max_jumbo_frame_size = Jumbo_Frame_7k;
2640                 CSR_WRITE_4(sc, RE_RXCFG, 0xFF00);
2641                 break;
2642         case 0x98000000:
2643                 sc->re_type = MACFG_6;
2644                 sc->max_jumbo_frame_size = Jumbo_Frame_7k;
2645                 CSR_WRITE_4(sc, RE_RXCFG, 0xFF00);
2646                 break;
2647         case 0x34000000:
2648         case 0xB4000000:
2649                 sc->re_type = MACFG_11;
2650                 sc->max_jumbo_frame_size = ETHERMTU;
2651                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2652                 break;
2653         case 0x34200000:
2654         case 0xB4200000:
2655                 sc->re_type = MACFG_12;
2656                 sc->max_jumbo_frame_size = ETHERMTU;
2657                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2658                 break;
2659         case 0x34300000:
2660         case 0xB4300000:
2661                 sc->re_type = MACFG_13;
2662                 sc->max_jumbo_frame_size = ETHERMTU;
2663                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2664                 break;
2665         case 0x34900000:
2666         case 0x24900000:
2667                 sc->re_type = MACFG_14;
2668                 sc->max_jumbo_frame_size = ETHERMTU;
2669                 sc->re_if_flags |= RL_FLAG_DESCV2;
2670                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2671                 break;
2672         case 0x34A00000:
2673         case 0x24A00000:
2674                 sc->re_type = MACFG_15;
2675                 sc->max_jumbo_frame_size = ETHERMTU;
2676                 sc->re_if_flags |= RL_FLAG_DESCV2;
2677                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2678                 break;
2679         case 0x34B00000:
2680         case 0x24B00000:
2681                 sc->re_type = MACFG_16;
2682                 sc->max_jumbo_frame_size = ETHERMTU;
2683                 sc->re_if_flags |= RL_FLAG_DESCV2;
2684                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2685                 break;
2686         case 0x34C00000:
2687         case 0x24C00000:
2688                 sc->re_type = MACFG_17;
2689                 sc->max_jumbo_frame_size = ETHERMTU;
2690                 sc->re_if_flags |= RL_FLAG_DESCV2;
2691                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2692                 break;
2693         case 0x34D00000:
2694         case 0x24D00000:
2695                 sc->re_type = MACFG_18;
2696                 sc->max_jumbo_frame_size = ETHERMTU;
2697                 sc->re_if_flags |= RL_FLAG_DESCV2;
2698                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2699                 break;
2700         case 0x34E00000:
2701         case 0x24E00000:
2702                 sc->re_type = MACFG_19;
2703                 sc->max_jumbo_frame_size = ETHERMTU;
2704                 sc->re_if_flags |= RL_FLAG_DESCV2;
2705                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2706                 break;
2707         case 0x30000000:
2708                 sc->re_type = MACFG_21;
2709                 sc->max_jumbo_frame_size = Jumbo_Frame_4k;
2710                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2711                 break;
2712         case 0x38000000:
2713                 sc->re_type = MACFG_22;
2714                 sc->max_jumbo_frame_size = Jumbo_Frame_4k;
2715                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2716                 break;
2717         case 0x38500000:
2718         case 0xB8500000:
2719         case 0x38700000:
2720         case 0xB8700000:
2721                 sc->re_type = MACFG_23;
2722                 sc->max_jumbo_frame_size = Jumbo_Frame_4k;
2723                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2724                 break;
2725         case 0x3C000000:
2726                 sc->re_type = MACFG_24;
2727                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
2728                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2729                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
2730                 break;
2731         case 0x3C200000:
2732                 sc->re_type = MACFG_25;
2733                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
2734                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2735                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
2736                 break;
2737         case 0x3C400000:
2738                 sc->re_type = MACFG_26;
2739                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
2740                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2741                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
2742                 break;
2743         case 0x3C900000:
2744                 sc->re_type = MACFG_27;
2745                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
2746                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2747                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
2748                 break;
2749         case 0x3CB00000:
2750                 sc->re_type = MACFG_28;
2751                 sc->max_jumbo_frame_size = Jumbo_Frame_6k;
2752                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2753                 CSR_WRITE_4(sc, RE_RXCFG, 0xC700);
2754                 break;
2755         case 0x28100000:
2756                 sc->re_type = MACFG_31;
2757                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2758                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2759                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
2760                 break;
2761         case 0x28200000:
2762                 sc->re_type = MACFG_32;
2763                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2764                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2765                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
2766                 break;
2767         case 0x28300000:
2768                 sc->re_type = MACFG_33;
2769                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2770                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2771                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
2772                 break;
2773         case 0x2C100000:
2774                 sc->re_type = MACFG_36;
2775                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2776                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2777                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
2778                 break;
2779         case 0x2C200000:
2780                 sc->re_type = MACFG_37;
2781                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2782                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2783                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
2784                 break;
2785         case 0x2C800000:
2786                 sc->re_type = MACFG_38;
2787                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2788                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2789                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
2790                 break;
2791         case 0x2C900000:
2792                 sc->re_type = MACFG_39;
2793                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2794                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2795                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
2796                 break;
2797         case 0x24000000:
2798                 sc->re_type = MACFG_41;
2799                 sc->max_jumbo_frame_size = ETHERMTU;
2800                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM ;
2801                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2802                 break;
2803         case 0x40900000:
2804                 sc->re_type = MACFG_42;
2805                 sc->max_jumbo_frame_size = ETHERMTU;
2806                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM ;
2807                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2808                 break;
2809         case 0x40A00000:
2810         case 0x40B00000:
2811         case 0x40C00000:
2812                 sc->re_type = MACFG_43;
2813                 sc->max_jumbo_frame_size = ETHERMTU;
2814                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM ;
2815                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2816                 break;
2817         case 0x48000000:
2818                 sc->re_type = MACFG_50;
2819                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2820                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2821                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
2822                 break;
2823         case 0x48100000:
2824                 sc->re_type = MACFG_51;
2825                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2826                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2827                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
2828                 break;
2829         case 0x48800000:
2830                 sc->re_type = MACFG_52;
2831                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2832                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2833                 CSR_WRITE_4(sc, RE_RXCFG, 0xBF00);
2834                 break;
2835         case 0x44000000:
2836                 sc->re_type = MACFG_53;
2837                 sc->max_jumbo_frame_size = ETHERMTU;
2838                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2839                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2840                 break;
2841         case 0x44800000:
2842                 sc->re_type = MACFG_54;
2843                 sc->max_jumbo_frame_size = ETHERMTU;
2844                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2845                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2846                 break;
2847         case 0x44900000:
2848                 sc->re_type = MACFG_55;
2849                 sc->max_jumbo_frame_size = ETHERMTU;
2850                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2851                 CSR_WRITE_4(sc, RE_RXCFG, 0xE700);
2852                 break;
2853         case 0x4C000000:
2854                 sc->re_type = MACFG_56;
2855                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2856                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2857                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
2858                 break;
2859         case 0x4C100000:
2860                 sc->re_type = MACFG_57;
2861                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2862                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2863                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
2864                 break;
2865         case 0x50800000:
2866                 sc->re_type = MACFG_58;
2867                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2868                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2869                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
2870                 break;
2871         case 0x50900000:
2872                 sc->re_type = MACFG_59;
2873                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2874                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2875                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
2876                 break;
2877         case 0x5C800000:
2878                 sc->re_type = MACFG_60;
2879                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2880                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2881                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
2882                 break;
2883         case 0x50000000:
2884                 sc->re_type = MACFG_61;
2885                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2886                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2887                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
2888                 break;
2889         case 0x50100000:
2890                 sc->re_type = MACFG_62;
2891                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2892                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2893                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
2894                 break;
2895         case 0x50200000:
2896                 sc->re_type = MACFG_67;
2897                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2898                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2899                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
2900                 break;
2901         case 0x28800000:
2902                 sc->re_type = MACFG_63;
2903                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2904                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2905                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
2906                 break;
2907         case 0x28900000:
2908                 sc->re_type = MACFG_64;
2909                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2910                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2911                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
2912                 break;
2913         case 0x28A00000:
2914                 sc->re_type = MACFG_65;
2915                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2916                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2917                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
2918                 break;
2919         case 0x28B00000:
2920                 sc->re_type = MACFG_66;
2921                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2922                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM;
2923                 CSR_WRITE_4(sc, RE_RXCFG, 0x8700);
2924                 break;
2925         case 0x54000000:
2926                 sc->re_type = MACFG_68;
2927                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2928                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2929                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
2930                 break;
2931         case 0x54100000:
2932                 sc->re_type = MACFG_69;
2933                 sc->max_jumbo_frame_size = Jumbo_Frame_9k;
2934                 sc->re_if_flags |= RL_FLAG_DESCV2 | RL_FLAG_PHYWAKE_PM | RL_FLAG_MAGIC_PACKET_V2;
2935                 CSR_WRITE_4(sc, RE_RXCFG, 0xCF00);
2936                 break;
2937         default:
2938                 device_printf(dev,"unknown device\n");
2939                 sc->re_type = MACFG_FF;
2940                 error = ENXIO;
2941                 break;
2942         }
2943
2944         switch(sc->re_device_id) {
2945         case RT_DEVICEID_8169:
2946         case RT_DEVICEID_8169SC:
2947         case RT_DEVICEID_8168:
2948         case RT_DEVICEID_8161:
2949                 //do nothing
2950                 break;
2951         default:
2952                 sc->max_jumbo_frame_size = ETHERMTU;
2953                 break;
2954         }
2955
2956         return error;
2957 }
2958
2959 static void re_init_software_variable(struct re_softc *sc)
2960 {
2961         switch(sc->re_device_id) {
2962         case RT_DEVICEID_8168:
2963         case RT_DEVICEID_8161:
2964         case RT_DEVICEID_8136:
2965                 sc->re_if_flags |= RL_FLAG_PCIE;
2966                 break;
2967         }
2968
2969         sc->re_rx_mbuf_sz = sc->max_jumbo_frame_size + ETHER_VLAN_ENCAP_LEN + ETHER_HDR_LEN + ETHER_CRC_LEN + RE_ETHER_ALIGN + 1;
2970
2971         if (sc->re_rx_mbuf_sz > MJUM9BYTES) {
2972                 sc->max_jumbo_frame_size -= (sc->re_rx_mbuf_sz - MJUM9BYTES);
2973                 sc->re_rx_mbuf_sz = MJUM9BYTES;
2974         }
2975
2976         switch(sc->re_type) {
2977         case MACFG_69: {
2978                 u_int16_t ioffset_p3, ioffset_p2, ioffset_p1, ioffset_p0;
2979                 u_int16_t TmpUshort;
2980
2981                 MP_WriteMcuAccessRegWord(sc, 0xDD02, 0x807D);
2982
2983                 TmpUshort = MP_ReadMcuAccessRegWord(sc, 0xDD02);
2984                 ioffset_p3 = ((TmpUshort & BIT_7) >>7);
2985                 ioffset_p3 <<= 3;
2986                 TmpUshort = MP_ReadMcuAccessRegWord(sc, 0xDD00);
2987
2988                 ioffset_p3 |= ((TmpUshort & (BIT_15 | BIT_14 | BIT_13))>>13);
2989
2990                 ioffset_p2 = ((TmpUshort & (BIT_12|BIT_11|BIT_10|BIT_9))>>9);
2991                 ioffset_p1 = ((TmpUshort & (BIT_8|BIT_7|BIT_6|BIT_5))>>5);
2992
2993                 ioffset_p0 = ((TmpUshort & BIT_4) >>4);
2994                 ioffset_p0 <<= 3;
2995                 ioffset_p0 |= (TmpUshort & (BIT_2| BIT_1 | BIT_0));
2996
2997                 if ((ioffset_p3 == 0x0F) && (ioffset_p2 == 0x0F) && (ioffset_p1 == 0x0F) && (ioffset_p0 == 0x0F)) {
2998                         sc->RequireAdcBiasPatch = FALSE;
2999                 } else {
3000                         sc->RequireAdcBiasPatch = TRUE;
3001                         sc->AdcBiasPatchIoffset = (ioffset_p3<<12)|(ioffset_p2<<8)|(ioffset_p1<<4)|(ioffset_p0);
3002                 }
3003         }
3004         break;
3005         }
3006
3007         switch(sc->re_type) {
3008         case MACFG_68:
3009         case MACFG_69: {
3010                 u_int16_t rg_saw_cnt;
3011
3012                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
3013                 rg_saw_cnt = MP_ReadPhyUshort(sc, 0x13);
3014                 rg_saw_cnt &= ~(BIT_15|BIT_14);
3015                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
3016
3017                 if (rg_saw_cnt > 0) {
3018                         sc->SwrCnt1msIni = 16000000/rg_saw_cnt;
3019                         sc->SwrCnt1msIni &= 0x0FFF;
3020
3021                         sc->RequireAdjustUpsTxLinkPulseTiming = TRUE;
3022                 }
3023         }
3024         break;
3025         }
3026
3027         switch(sc->re_type) {
3028         case MACFG_31:
3029         case MACFG_32:
3030         case MACFG_33:
3031         case MACFG_36:
3032         case MACFG_37:
3033         case MACFG_38:
3034         case MACFG_39:
3035         case MACFG_42:
3036         case MACFG_43:
3037         case MACFG_50:
3038         case MACFG_51:
3039         case MACFG_52:
3040         case MACFG_53:
3041         case MACFG_54:
3042         case MACFG_55:
3043         case MACFG_56:
3044         case MACFG_57:
3045         case MACFG_58:
3046         case MACFG_59:
3047         case MACFG_60:
3048         case MACFG_61:
3049         case MACFG_62:
3050         case MACFG_63:
3051         case MACFG_64:
3052         case MACFG_65:
3053         case MACFG_66:
3054         case MACFG_67:
3055         case MACFG_68:
3056         case MACFG_69:
3057                 sc->re_hw_enable_msi_msix = TRUE;
3058                 break;
3059         }
3060
3061         switch(sc->re_type) {
3062         case MACFG_3:
3063         case MACFG_4:
3064         case MACFG_5:
3065         case MACFG_6:
3066         case MACFG_11:
3067         case MACFG_12:
3068         case MACFG_13:
3069         case MACFG_21:
3070         case MACFG_22:
3071         case MACFG_23:
3072         case MACFG_24:
3073         case MACFG_25:
3074         case MACFG_26:
3075         case MACFG_27:
3076         case MACFG_28:
3077         case MACFG_41:
3078         case MACFG_42:
3079         case MACFG_43:
3080         case MACFG_54:
3081         case MACFG_55:
3082                 sc->re_coalesce_tx_pkt = TRUE;
3083                 break;
3084         }
3085
3086         switch(sc->re_type) {
3087         case MACFG_36:
3088         case MACFG_37:
3089         case MACFG_38:
3090         case MACFG_39:
3091         case MACFG_42:
3092         case MACFG_43:
3093         case MACFG_50:
3094         case MACFG_51:
3095         case MACFG_52:
3096         case MACFG_53:
3097         case MACFG_54:
3098         case MACFG_55:
3099         case MACFG_56:
3100         case MACFG_57:
3101         case MACFG_58:
3102         case MACFG_59:
3103         case MACFG_60:
3104         case MACFG_61:
3105         case MACFG_62:
3106         case MACFG_67:
3107         case MACFG_68:
3108         case MACFG_69:
3109                 sc->re_hw_supp_now_is_oob_ver = 1;
3110                 break;
3111         }
3112
3113         sc->re_8169_MacVersion=(CSR_READ_4(sc, RE_TXCFG)&0x7c800000)>>25;               /* Get bit 26~30        */
3114         sc->re_8169_MacVersion|=((CSR_READ_4(sc, RE_TXCFG)&0x00800000)!=0 ? 1:0);       /* Get bit 23           */
3115         DBGPRINT1(sc->re_unit,"8169 Mac Version %d",sc->re_8169_MacVersion);
3116
3117         /* Rtl8169s single chip detected */
3118         if (sc->re_type == MACFG_3) {
3119                 RE_LOCK(sc);
3120                 sc->re_8169_PhyVersion=(MP_ReadPhyUshort(sc, 0x03)&0x000f);
3121                 DBGPRINT1(sc->re_unit,"8169 Phy Version %d",sc->re_8169_PhyVersion);
3122                 RE_UNLOCK(sc);
3123         }
3124
3125 #ifndef __DragonFly__
3126         sc->link_state = LINK_STATE_UNKNOWN;
3127 #endif
3128 }
3129
3130 static void re_hw_d3_para(struct re_softc *sc)
3131 {
3132         if (sc->re_type == MACFG_59 || sc->re_type == MACFG_60 ||
3133             sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
3134             sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
3135                 MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0000);
3136                 MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0500);
3137         }
3138 }
3139
3140 #ifndef __DragonFly__
3141 /*
3142 * Attach the interface. Allocate softc structures, do ifmedia
3143 * setup and ethernet/BPF attach.
3144 */
3145 static int re_attach(device_t dev)
3146 {
3147         /*int                   s;*/
3148         u_char                  eaddr[ETHER_ADDR_LEN];
3149         u_int32_t               command;
3150         struct re_softc         *sc;
3151         struct ifnet            *ifp;
3152         int                     unit, error = 0, rid, i;
3153 //      int                     mac_version;
3154 //      int                     mode;
3155 //      u_int8_t                data8;
3156         int     reg;
3157         int             msic=0, msixc=0;
3158
3159         /*s = splimp();*/
3160
3161         sc = device_get_softc(dev);
3162         unit = device_get_unit(dev);
3163         bzero(sc, sizeof(struct re_softc));
3164         RE_LOCK_INIT(sc,device_get_nameunit(dev));
3165         sc->dev = dev;
3166
3167         sc->driver_detach = 0;
3168
3169         sc->re_device_id = pci_get_device(dev);
3170         sc->re_revid = pci_get_revid(dev);
3171         pci_enable_busmaster(dev);
3172
3173         /*
3174          * Map control/status registers.
3175          */
3176         command = pci_read_config(dev, PCIR_COMMAND, 4);
3177         command |= (PCIM_CMD_PORTEN|PCIM_CMD_MEMEN|PCIM_CMD_BUSMASTEREN);
3178         pci_write_config(dev, PCIR_COMMAND, command, 4);
3179         command = pci_read_config(dev, PCIR_COMMAND, 4);
3180
3181         if (prefer_iomap == 0) {
3182                 sc->re_res_id = PCIR_BAR(1);
3183                 sc->re_res_type = SYS_RES_MEMORY;
3184                 /* PCIE NIC use different BARs. */
3185                 if (sc->re_device_id == RT_DEVICEID_8168 || sc->re_device_id == RT_DEVICEID_8161 ||
3186                     sc->re_device_id == RT_DEVICEID_8136)
3187                         sc->re_res_id = PCIR_BAR(2);
3188         } else {
3189                 sc->re_res_id = PCIR_BAR(0);
3190                 sc->re_res_type = SYS_RES_IOPORT;
3191         }
3192         sc->re_res = bus_alloc_resource(dev, sc->re_res_type, &sc->re_res_id,
3193                                         0, ~0, 1, RF_ACTIVE);
3194         if (sc->re_res == NULL && prefer_iomap == 0) {
3195                 sc->re_res_id = PCIR_BAR(0);
3196                 sc->re_res_type = SYS_RES_IOPORT;
3197                 sc->re_res = bus_alloc_resource(dev, sc->re_res_type, &sc->re_res_id,
3198                                                 0, ~0, 1, RF_ACTIVE);
3199         }
3200
3201         if (sc->re_res == NULL) {
3202                 device_printf(dev,"couldn't map ports/memory\n");
3203                 error = ENXIO;
3204                 goto fail;
3205         }
3206
3207         if (sc->re_res_type == SYS_RES_IOPORT)
3208                 device_printf(dev, "Using I/O Ports\n");
3209         else
3210                 device_printf(dev, "Using Memory Mapping!\n");
3211
3212         sc->re_btag = rman_get_bustag(sc->re_res);
3213         sc->re_bhandle = rman_get_bushandle(sc->re_res);
3214
3215         error = re_check_mac_version(sc);
3216
3217         if (error) {
3218                 goto fail;
3219         }
3220
3221         re_init_software_variable(sc);
3222
3223 #if OS_VER >= VERSION(7,0)
3224         msic = pci_msi_count(dev);
3225         msixc = pci_msix_count(dev);
3226         if (pci_find_cap(dev, PCIY_EXPRESS, &reg) == 0) {
3227                 sc->re_if_flags |= RL_FLAG_PCIE;
3228                 sc->re_expcap = reg;
3229         } else {
3230                 sc->re_if_flags &= ~RL_FLAG_PCIE;
3231                 sc->re_expcap = 0;
3232         }
3233
3234         //device_printf(dev, "MSI count : %d\n", msic);
3235         //device_printf(dev, "MSI-X count : %d\n", msixc);
3236         if (sc->re_hw_enable_msi_msix == FALSE) {
3237                 msixc = 0;
3238                 msic = 0;
3239         }
3240         if (msix_disable > 0)
3241                 msixc = 0;
3242         if (msi_disable > 0)
3243                 msic = 0;
3244
3245         /* Prefer MSI-X to MSI. */
3246         if (msixc > 0) {
3247                 rid = PCIR_BAR(4);
3248                 msixc = RL_MSI_MESSAGES;
3249                 sc->re_res_pba = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
3250                                                         &rid, RF_ACTIVE);
3251                 if (sc->re_res_pba == NULL) {
3252                         device_printf(dev,
3253                                       "could not allocate MSI-X PBA resource\n");
3254                 }
3255                 if (sc->re_res_pba != NULL &&
3256                     pci_alloc_msix(dev, &msixc) == 0) {
3257                         if (msixc == RL_MSI_MESSAGES) {
3258                                 device_printf(dev, "Using %d MSI-X message\n",
3259                                               msixc);
3260                                 sc->re_if_flags |= RL_FLAG_MSIX;
3261                         } else
3262                                 pci_release_msi(dev);
3263                 }
3264                 if ((sc->re_if_flags & RL_FLAG_MSIX) == 0) {
3265                         if (sc->re_res_pba != NULL)
3266                                 bus_release_resource(dev, SYS_RES_MEMORY, rid,
3267                                                      sc->re_res_pba);
3268                         sc->re_res_pba = NULL;
3269                         msixc = 0;
3270                 }
3271         }
3272
3273         /* Prefer MSI to INTx. */
3274         if (msixc == 0 && msic > 0) {
3275                 msic = RL_MSI_MESSAGES;
3276                 if (pci_alloc_msi(dev, &msic) == 0) {
3277                         if (msic == RL_MSI_MESSAGES) {
3278                                 device_printf(dev, "Using %d MSI message\n",
3279                                               msic);
3280                                 sc->re_if_flags |= RL_FLAG_MSI;
3281                         } else
3282                                 pci_release_msi(dev);
3283                 }
3284                 if ((sc->re_if_flags & RL_FLAG_MSI) == 0)
3285                         msic = 0;
3286         }
3287 #endif //OS_VER >= VERSION(7,0)
3288
3289         if ((sc->re_if_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) {
3290                 rid = 0;
3291                 sc->re_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1,
3292                                                 RF_SHAREABLE | RF_ACTIVE);
3293
3294                 if (sc->re_irq == NULL) {
3295                         device_printf(dev,"couldn't map interrupt\n");
3296                         error = ENXIO;
3297                         goto fail;
3298                 }
3299                 device_printf(dev, "Using line-based interrupt\n");
3300         } else {
3301                 rid = 1;
3302                 sc->re_irq = bus_alloc_resource_any(dev,
3303                                                     SYS_RES_IRQ, &rid, RF_ACTIVE);
3304                 if (sc->re_irq == NULL) {
3305                         device_printf(dev,
3306                                       "couldn't allocate IRQ resources for "
3307                                       "message %d\n", rid);
3308                         error = ENXIO;
3309                         goto fail;
3310                 }
3311         }
3312
3313 #if OS_VER >= VERSION(7,3)
3314         /* Disable ASPM L0S/L1 and Clock Request. */
3315         if (sc->re_expcap != 0) {
3316                 u_int32_t               cap, ctl;
3317                 cap = pci_read_config(dev, sc->re_expcap +
3318                                       RE_PCIER_LINK_CAP, 2);
3319                 if ((cap & RE_PCIEM_LINK_CAP_ASPM) != 0) {
3320                         ctl = pci_read_config(dev, sc->re_expcap +
3321                                               RE_PCIER_LINK_CTL, 2);
3322                         if ((ctl & 0x0103) != 0) {
3323                                 ctl &= ~0x0103;
3324                                 pci_write_config(dev, sc->re_expcap +
3325                                                  RE_PCIER_LINK_CTL, ctl, 2);
3326                                 device_printf(dev, "ASPM disabled\n");
3327                         }
3328                 } else
3329                         device_printf(dev, "no ASPM capability\n");
3330         }
3331 #endif //OS_VER >= VERSION(7,3)
3332
3333         re_init_timer(sc);
3334
3335         RE_LOCK(sc);
3336         re_exit_oob(sc);
3337         re_hw_init(sc);
3338         RE_UNLOCK(sc);
3339
3340         /*
3341          * Reset the adapter. Only take the lock here as it's needed in
3342          * order to call re_reset().
3343          */
3344         RE_LOCK(sc);
3345         re_reset(sc);
3346         RE_UNLOCK(sc);
3347
3348         /* Get station address. */
3349         re_get_hw_mac_address(sc, eaddr);
3350
3351         /*
3352          * A RealTek chip was detected. Inform the world.
3353          */
3354         device_printf(dev,"version:1.93\n");
3355         device_printf(dev,"Ethernet address: %6D\n", eaddr, ":");
3356         printf("\nThis product is covered by one or more of the following patents: \
3357            \nUS6,570,884, US6,115,776, and US6,327,625.\n");
3358
3359         sc->re_unit = unit;
3360
3361 #if OS_VER < VERSION(6,0)
3362         bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN);
3363 #endif
3364
3365         if (sc->re_type == MACFG_3) {   /* Change PCI Latency time*/
3366                 pci_write_config(dev, RE_PCI_LATENCY_TIMER, 0x40, 1);
3367         }
3368
3369         error = bus_dma_tag_create(
3370 #if OS_VER < VERSION(7,0)
3371                         NULL,
3372 #else
3373                         bus_get_dma_tag(dev),           /* parent */
3374 #endif
3375                         1, 0,           /* alignment, boundary */
3376                         BUS_SPACE_MAXADDR,              /* lowaddr */
3377                         BUS_SPACE_MAXADDR,              /* highaddr */
3378                         NULL, NULL,                     /* filter, filterarg */
3379                         BUS_SPACE_MAXSIZE_32BIT,        /* maxsize */
3380                         0,                              /* nsegments */
3381                         BUS_SPACE_MAXSIZE_32BIT,        /* maxsegsize */
3382                         0,                              /* flags */
3383                         NULL, NULL,                     /* lockfunc, lockarg */
3384                         &sc->re_parent_tag);
3385
3386         i = roundup2(sizeof(union RxDesc)*RE_RX_BUF_NUM, RE_DESC_ALIGN);
3387         error = bus_dma_tag_create(
3388                         sc->re_parent_tag,
3389                         RE_DESC_ALIGN, 0,               /* alignment, boundary */
3390                         BUS_SPACE_MAXADDR,              /* lowaddr */
3391                         BUS_SPACE_MAXADDR,              /* highaddr */
3392                         NULL, NULL,                     /* filter, filterarg */
3393                         i,                              /* maxsize */
3394                         1,                              /* nsegments */
3395                         i,                              /* maxsegsize */
3396                         0,                              /* flags */
3397                         NULL, NULL,                     /* lockfunc, lockarg */
3398                         &sc->re_desc.rx_desc_tag);
3399         if (error) {
3400                 device_printf(dev,"bus_dma_tag_create fail\n");
3401                 goto fail;
3402         }
3403
3404         error = bus_dmamem_alloc(sc->re_desc.rx_desc_tag,
3405                                  (void**) &sc->re_desc.rx_desc,
3406                                  BUS_DMA_WAITOK|BUS_DMA_COHERENT|BUS_DMA_ZERO,
3407                                  &sc->re_desc.rx_desc_dmamap);
3408         if (error) {
3409                 device_printf(dev,"bus_dmamem_alloc fail\n");
3410                 goto fail;
3411         }
3412
3413         i = roundup2(sizeof(union TxDesc)*RE_TX_BUF_NUM, RE_DESC_ALIGN);
3414         error = bus_dma_tag_create(
3415                         sc->re_parent_tag,
3416                         RE_DESC_ALIGN, 0,               /* alignment, boundary */
3417                         BUS_SPACE_MAXADDR,              /* lowaddr */
3418                         BUS_SPACE_MAXADDR,              /* highaddr */
3419                         NULL, NULL,                     /* filter, filterarg */
3420                         i,                              /* maxsize */
3421                         1,                              /* nsegments */
3422                         i,                              /* maxsegsize */
3423                         0,                              /* flags */
3424                         NULL, NULL,                     /* lockfunc, lockarg */
3425                         &sc->re_desc.tx_desc_tag);
3426         if (error) {
3427                 device_printf(dev,"bus_dma_tag_create fail\n");
3428                 goto fail;
3429         }
3430
3431         error = bus_dmamem_alloc(sc->re_desc.tx_desc_tag,
3432                                  (void**) &sc->re_desc.tx_desc,
3433                                  BUS_DMA_WAITOK|BUS_DMA_COHERENT|BUS_DMA_ZERO,
3434                                  &sc->re_desc.tx_desc_dmamap);
3435
3436         if (error) {
3437                 device_printf(dev,"bus_dmamem_alloc fail\n");
3438                 goto fail;
3439         }
3440
3441         RE_LOCK(sc);
3442         re_phy_power_up(dev);
3443         re_hw_phy_config(sc);
3444         re_clrwol(sc);
3445         RE_UNLOCK(sc);
3446
3447         sc->re_tx_cstag =1;
3448         sc->re_rx_cstag =1;
3449
3450 #if OS_VER < VERSION(6,0)
3451         ifp = &sc->arpcom.ac_if;
3452 #else
3453         ifp = sc->re_ifp = if_alloc(IFT_ETHER);
3454         if (ifp == NULL) {
3455                 device_printf(dev, "can not if_alloc()\n");
3456                 error = ENOSPC;
3457                 goto fail;
3458         }
3459 #endif
3460         ifp->if_softc = sc;
3461 #if OS_VER < VERSION(5,3)
3462         ifp->if_unit = unit;
3463         ifp->if_name = "re";
3464 #else
3465         if_initname(ifp, device_get_name(dev), device_get_unit(dev));
3466 #endif
3467         ifp->if_mtu = ETHERMTU;
3468         ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
3469         ifp->if_ioctl = re_ioctl;
3470         ifp->if_output = ether_output;
3471         ifp->if_start = re_start;
3472 #if OS_VER < VERSION(7,0)
3473         ifp->if_watchdog = re_watchdog;
3474 #endif
3475         if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_25) || (sc->re_type == MACFG_26))
3476                 ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
3477         else
3478                 ifp->if_hwassist |= RE_CSUM_FEATURES;
3479
3480         ifp->if_capabilities = IFCAP_HWCSUM;
3481         ifp->if_capenable = ifp->if_capabilities;
3482         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
3483         ifp->if_init = re_init;
3484         /* VLAN capability setup */
3485         ifp->if_capabilities |= IFCAP_VLAN_MTU | IFCAP_VLAN_HWTAGGING;
3486         ifp->if_capenable = ifp->if_capabilities;
3487
3488         /* Enable WOL if PM is supported. */
3489         if (pci_find_cap(sc->dev, PCIY_PMG, &reg) == 0)
3490                 ifp->if_capabilities |= IFCAP_WOL;
3491         ifp->if_capenable = ifp->if_capabilities;
3492         ifp->if_capenable &= ~(IFCAP_WOL_UCAST | IFCAP_WOL_MCAST);
3493
3494         RE_LOCK(sc);
3495         set_rxbufsize(sc);
3496         error =re_alloc_buf(sc);
3497
3498         if (error) {
3499                 RE_UNLOCK(sc);
3500                 goto fail;
3501         }
3502         /* Init descriptors. */
3503         re_var_init(sc);
3504
3505         RE_UNLOCK(sc);
3506
3507         switch(sc->re_device_id) {
3508         case RT_DEVICEID_8169:
3509         case RT_DEVICEID_8169SC:
3510         case RT_DEVICEID_8168:
3511         case RT_DEVICEID_8161:
3512                 ifp->if_baudrate = 1000000000;
3513                 break;
3514
3515         default:
3516                 ifp->if_baudrate = 100000000;
3517                 break;
3518         }
3519         IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN);
3520         ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN;
3521         IFQ_SET_READY(&ifp->if_snd);
3522
3523 #if OS_VER>=VERSION(7,0)
3524         TASK_INIT(&sc->re_inttask, 0, re_int_task, sc);
3525 #endif
3526
3527         /*
3528          * Call MI attach routine.
3529          */
3530         /*#if OS_VER < VERSION(5, 1)*/
3531 #if OS_VER < VERSION(4,9)
3532         ether_ifattach(ifp, ETHER_BPF_SUPPORTED);
3533 #else
3534         ether_ifattach(ifp, eaddr);
3535 #endif
3536
3537 #if OS_VER < VERSION(7,0)
3538         error = bus_setup_intr(dev, sc->re_irq, INTR_TYPE_NET,
3539                                re_intr, sc, &sc->re_intrhand);
3540 #else
3541         error = bus_setup_intr(dev, sc->re_irq, INTR_TYPE_NET|INTR_MPSAFE,
3542                                re_intr, NULL, sc, &sc->re_intrhand);
3543 #endif
3544
3545         if (error) {
3546 #if OS_VER < VERSION(4,9)
3547                 ether_ifdetach(ifp, ETHER_BPF_SUPPORTED);
3548 #else
3549                 ether_ifdetach(ifp);
3550 #endif
3551                 device_printf(dev,"couldn't set up irq\n");
3552                 goto fail;
3553         }
3554
3555         /*
3556          * Specify the media types supported by this adapter and register
3557          * callbacks to update media and link information
3558          */
3559         ifmedia_init(&sc->media, IFM_IMASK, re_ifmedia_upd, re_ifmedia_sts);
3560         ifmedia_add(&sc->media, IFM_ETHER | IFM_10_T, 0, NULL);
3561         ifmedia_add(&sc->media, IFM_ETHER | IFM_10_T | IFM_FDX, 0, NULL);
3562         ifmedia_add(&sc->media, IFM_ETHER | IFM_100_TX, 0, NULL);
3563         ifmedia_add(&sc->media, IFM_ETHER | IFM_100_TX | IFM_FDX, 0, NULL);
3564         switch(sc->re_device_id) {
3565         case RT_DEVICEID_8169:
3566         case RT_DEVICEID_8169SC:
3567         case RT_DEVICEID_8168:
3568         case RT_DEVICEID_8161:
3569                 ifmedia_add(&sc->media, IFM_ETHER | IFM_1000_T | IFM_FDX, 0, NULL);
3570                 ifmedia_add(&sc->media, IFM_ETHER | IFM_1000_T, 0, NULL);
3571                 break;
3572
3573         default:
3574                 break;
3575         }
3576         ifmedia_add(&sc->media, IFM_ETHER | IFM_AUTO, 0, NULL);
3577         ifmedia_set(&sc->media, IFM_ETHER | IFM_AUTO);
3578         sc->media.ifm_media = IFM_ETHER | IFM_AUTO;
3579         re_ifmedia_upd(ifp);
3580
3581 fail:
3582         if (error)
3583                 re_detach(dev);
3584
3585         return(error);
3586 }
3587
3588 static int re_detach(device_t dev)
3589 {
3590         struct re_softc         *sc;
3591         struct ifnet            *ifp;
3592         /*int                   s;*/
3593         int                     i;
3594         int                     rid;
3595
3596         /*s = splimp();*/
3597
3598         sc = device_get_softc(dev);
3599
3600         ifp = RE_GET_IFNET(sc);
3601
3602         /* These should only be active if attach succeeded */
3603         if (device_is_attached(dev)) {
3604                 RE_LOCK(sc);
3605                 re_stop(sc);
3606                 RE_UNLOCK(sc);
3607 #if OS_VER>=VERSION(7,0)
3608                 taskqueue_drain(taskqueue_fast, &sc->re_inttask);
3609 #endif
3610 #if OS_VER < VERSION(4,9)
3611                 ether_ifdetach(ifp, ETHER_BPF_SUPPORTED);
3612 #else
3613                 ether_ifdetach(ifp);
3614 #endif
3615         }
3616
3617         bus_generic_detach(dev);
3618
3619         sc->driver_detach = 1;
3620
3621         if (sc->re_intrhand)
3622                 bus_teardown_intr(dev, sc->re_irq, sc->re_intrhand);
3623
3624 #if OS_VER>=VERSION(6,0)
3625         if (ifp)
3626                 if_free(ifp);
3627 #endif
3628
3629         if ((sc->re_if_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0)
3630                 rid = 0;
3631         else
3632                 rid = 1;
3633         if (sc->re_irq) {
3634                 bus_release_resource(dev, SYS_RES_IRQ, rid, sc->re_irq);
3635                 sc->re_irq = NULL;
3636         }
3637         if ((sc->re_if_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) != 0)
3638                 pci_release_msi(dev);
3639         if (sc->re_res_pba) {
3640                 rid = PCIR_BAR(4);
3641                 bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->re_res_pba);
3642         }
3643         if (sc->re_res)
3644                 bus_release_resource(dev, sc->re_res_type, sc->re_res_id, sc->re_res);
3645
3646         if (sc->re_desc.re_rx_mtag) {
3647                 for (i = 0; i < RE_RX_BUF_NUM; i++) {
3648                         if (sc->re_desc.rx_buf[i]!=NULL) {
3649                                 bus_dmamap_sync(sc->re_desc.re_rx_mtag,
3650                                                 sc->re_desc.re_rx_dmamap[i],
3651                                                 BUS_DMASYNC_POSTREAD);
3652                                 bus_dmamap_unload(sc->re_desc.re_rx_mtag,
3653                                                   sc->re_desc.re_rx_dmamap[i]);
3654                                 bus_dmamap_destroy(sc->re_desc.re_rx_mtag,
3655                                                    sc->re_desc.re_rx_dmamap[i]);
3656                                 m_freem(sc->re_desc.rx_buf[i]);
3657                                 sc->re_desc.rx_buf[i] =NULL;
3658                         }
3659                 }
3660                 bus_dma_tag_destroy(sc->re_desc.re_rx_mtag);
3661                 sc->re_desc.re_rx_mtag =0;
3662         }
3663
3664         if (sc->re_desc.re_tx_mtag) {
3665                 for (i = 0; i < RE_TX_BUF_NUM; i++) {
3666                         bus_dmamap_destroy(sc->re_desc.re_tx_mtag,
3667                                            sc->re_desc.re_tx_dmamap[i]);
3668                 }
3669                 bus_dma_tag_destroy(sc->re_desc.re_tx_mtag);
3670                 sc->re_desc.re_tx_mtag =0;
3671         }
3672
3673         if (sc->re_desc.rx_desc_tag) {
3674                 bus_dmamap_sync(sc->re_desc.rx_desc_tag,
3675                                 sc->re_desc.rx_desc_dmamap,
3676                                 BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
3677                 bus_dmamap_unload(sc->re_desc.rx_desc_tag,
3678                                   sc->re_desc.rx_desc_dmamap);
3679                 bus_dmamem_free(sc->re_desc.rx_desc_tag,
3680                                 sc->re_desc.rx_desc,
3681                                 sc->re_desc.rx_desc_dmamap);
3682                 bus_dma_tag_destroy(sc->re_desc.rx_desc_tag);
3683         }
3684
3685         if (sc->re_desc.tx_desc_tag) {
3686                 bus_dmamap_sync(sc->re_desc.tx_desc_tag,
3687                                 sc->re_desc.tx_desc_dmamap,
3688                                 BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
3689                 bus_dmamap_unload(sc->re_desc.tx_desc_tag,
3690                                   sc->re_desc.tx_desc_dmamap);
3691                 bus_dmamem_free(sc->re_desc.tx_desc_tag,
3692                                 sc->re_desc.tx_desc,
3693                                 sc->re_desc.tx_desc_dmamap);
3694                 bus_dma_tag_destroy(sc->re_desc.tx_desc_tag);
3695         }
3696
3697         if (sc->re_parent_tag) {
3698                 bus_dma_tag_destroy(sc->re_parent_tag);
3699         }
3700
3701         /*splx(s);*/
3702         RE_LOCK_DESTROY(sc);
3703
3704         return(0);
3705 }
3706 #endif  /* !__DragonFly__ */
3707
3708 #ifndef __DragonFly__
3709 static void
3710 re_link_state_change(struct ifnet *ifp, int link_state)
3711 {
3712 #if OS_VER>=VERSION(6,0)
3713         if_link_state_change(ifp, link_state);
3714 #else
3715         ifp->if_link_state = link_state
3716 #endif
3717 }
3718
3719 /*
3720   * Device suspend routine.  Stop the interface and save some PCI
3721   * settings in case the BIOS doesn't restore them properly on
3722   * resume.
3723   */
3724 static int
3725 re_suspend(device_t dev)
3726 {
3727         struct re_softc         *sc;
3728         struct ifnet            *ifp;
3729
3730         sc = device_get_softc(dev);
3731         RE_LOCK(sc);
3732         ifp = RE_GET_IFNET(sc);
3733         sc->re_link_chg_det = 0;
3734         re_stop(sc);
3735         re_hw_d3_para(sc);
3736         re_setwol(sc);
3737         sc->suspended = 1;
3738         sc->link_state = LINK_STATE_UNKNOWN;
3739         re_link_state_change(ifp, sc->link_state);
3740         sc->prohibit_access_reg = 1;
3741         RE_UNLOCK(sc);
3742
3743         return (0);
3744 }
3745
3746 /*
3747  * Device resume routine.  Restore some PCI settings in case the BIOS
3748  * doesn't, re-enable busmastering, and restart the interface if
3749  * appropriate.
3750  */
3751 static int
3752 re_resume(device_t dev)
3753 {
3754         struct re_softc         *sc;
3755         struct ifnet            *ifp;
3756
3757         sc = device_get_softc(dev);
3758
3759         RE_LOCK(sc);
3760
3761         ifp = RE_GET_IFNET(sc);
3762
3763         sc->prohibit_access_reg = 0;
3764
3765         re_exit_oob(sc);
3766
3767         re_hw_init(sc);
3768
3769         re_reset(sc);
3770
3771         re_phy_power_up(dev);
3772
3773         re_hw_phy_config(sc);
3774
3775         /*
3776          * Clear WOL matching such that normal Rx filtering
3777          * wouldn't interfere with WOL patterns.
3778          */
3779         re_clrwol(sc);
3780
3781         RE_UNLOCK(sc);
3782
3783         RE_LOCK(sc);
3784         re_ifmedia_upd(ifp);
3785         sc->suspended = 0;
3786         if (ifp->if_flags & IFF_UP) {
3787                 sc->re_link_chg_det = 1;
3788                 re_start_timer(sc);
3789         }
3790         RE_UNLOCK(sc);
3791
3792         return (0);
3793 }
3794 #endif  /* !__DragonFly__ */
3795
3796
3797 static void
3798 ClearAndSetPCIePhyBit(
3799         struct re_softc *sc,
3800         u_int8_t   addr,
3801         u_int16_t   clearmask,
3802         u_int16_t   setmask
3803 )
3804 {
3805         u_int16_t EphyValue;
3806
3807         EphyValue = MP_ReadEPhyUshort(sc, addr);
3808         EphyValue &= ~clearmask;
3809         EphyValue |= setmask;
3810         MP_WriteEPhyUshort(sc, addr, EphyValue);
3811 }
3812
3813 static void
3814 ClearPCIePhyBit(
3815         struct re_softc *sc,
3816         u_int8_t   addr,
3817         u_int16_t   mask
3818 )
3819 {
3820         ClearAndSetPCIePhyBit(sc,
3821                               addr,
3822                               mask,
3823                               0
3824                              );
3825 }
3826
3827 static void
3828 SetPCIePhyBit(
3829         struct re_softc *sc,
3830         u_int8_t   addr,
3831         u_int16_t   mask
3832 )
3833 {
3834         ClearAndSetPCIePhyBit(sc,
3835                               addr,
3836                               0,
3837                               mask
3838                              );
3839 }
3840
3841 #ifndef __DragonFly__
3842 /*
3843  * Stop all chip I/O so that the kernel's probe routines don't
3844  * get confused by errant DMAs when rebooting.
3845  */
3846 static int re_shutdown(dev)     /* The same with re_stop(sc) */
3847 device_t                dev;
3848 {
3849         struct re_softc         *sc;
3850
3851         sc = device_get_softc(dev);
3852
3853         switch(sc->re_type) {
3854         case MACFG_61:
3855         case MACFG_62:
3856         case MACFG_67:
3857         case MACFG_63:
3858         case MACFG_64:
3859         case MACFG_65:
3860         case MACFG_66:
3861                 re_driver_stop(sc);
3862                 break;
3863         }
3864
3865         RE_LOCK(sc);
3866         sc->re_link_chg_det = 0;
3867         re_stop(sc);
3868         RE_UNLOCK(sc);
3869
3870         RE_LOCK(sc);
3871         re_hw_d3_para(sc);
3872         re_phy_power_down(dev);
3873         RE_UNLOCK(sc);
3874
3875         return 0;
3876 }
3877 #endif  /* !__DragonFly__ */
3878
3879 static void re_hw_start_unlock(struct re_softc *sc)
3880 {
3881         struct ifnet            *ifp;
3882         u_int32_t               macver;
3883         u_int8_t                data8;
3884         u_int16_t               data16 = 0;
3885         u_int32_t               Data32;
3886
3887         ifp = RE_GET_IFNET(sc);
3888
3889 #ifndef __DragonFly__
3890         /* Init descriptors. */
3891         re_var_init(sc);
3892 #endif
3893
3894         CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_WRITECFG);
3895
3896         /*disable Link Down Power Saving(non-LDPS)*/
3897         /*CSR_WRITE_1(sc, RE_LDPS, 0x05);*/
3898         /*ldps= CSR_READ_1(sc, RE_LDPS);*/
3899
3900         CSR_WRITE_2(sc, RE_CPCR, 0x2060);
3901
3902         CSR_WRITE_2(sc, RE_IM, 0x5151);
3903
3904         CSR_WRITE_1(sc, RE_MTPS, 0x3f);
3905
3906         if (sc->re_device_id == RT_DEVICEID_8169 || sc->re_device_id == RT_DEVICEID_8169SC) {
3907                 //do nothing
3908         } else {
3909                 /* Set the initial TX configuration.*/
3910                 CSR_WRITE_4(sc, RE_TXCFG, RE_TXCFG_CONFIG);
3911         }
3912
3913         macver = CSR_READ_4(sc, RE_TXCFG) & 0xFC800000;
3914         if (macver == 0x00800000 || macver == 0x04000000 || macver == 0x10000000) {
3915                 CSR_WRITE_2(sc, RE_CPlusCmd, 0x0063| ((sc->re_type == MACFG_3 && sc->re_8169_MacVersion==1) ? 0x4008:0));
3916         } else if (macver == 0x18000000 || macver == 0x98000000) {
3917                 CSR_WRITE_2(sc, RE_CPlusCmd, 0x0068);
3918                 CSR_WRITE_2(sc, 0xe2, 0x0000);
3919         } else if (macver == 0x30000000) {
3920                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
3921                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
3922
3923                 if (ifp->if_mtu > ETHERMTU) {
3924                         data8 = pci_read_config(sc->dev, 0x69, 1);
3925                         data8 &= ~0x70;
3926                         data8 |= 0x28;
3927                         pci_write_config(sc->dev, 0x69, data8, 1);
3928                 } else {
3929                         data8 = pci_read_config(sc->dev, 0x69, 1);
3930                         data8 &= ~0x70;
3931                         data8 |= 0x58;
3932                         pci_write_config(sc->dev, 0x69, data8, 1);
3933                 }
3934         } else if (macver == 0x38000000) {
3935                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
3936                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
3937
3938                 if (ifp->if_mtu > ETHERMTU) {
3939                         data8 = pci_read_config(sc->dev, 0x69, 1);
3940                         data8 &= ~0x70;
3941                         data8 |= 0x28;
3942                         pci_write_config(sc->dev, 0x69, data8, 1);
3943                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | BIT_0);
3944                 } else {
3945                         data8 = pci_read_config(sc->dev, 0x69, 1);
3946                         data8 &= ~0x70;
3947                         data8 |= 0x58;
3948                         pci_write_config(sc->dev, 0x69, data8, 1);
3949                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~ BIT_0);
3950                 }
3951         } else if (macver == 0x34000000 || macver == 0xB4000000) {
3952                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
3953         } else if (macver == 0x34800000 || macver == 0x24800000) {
3954                 if (pci_read_config(sc->dev, 0x81, 1) == 1) {
3955                         CSR_WRITE_1(sc, RE_DBG_reg, 0x98);
3956                         CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | 0x80);
3957                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | 0x04);
3958                         pci_write_config(sc->dev, 0x81, 1, 1);
3959                 }
3960
3961                 data8 = pci_read_config(sc->dev, 0x79, 1);
3962                 data8 &= ~0x70;
3963                 data8 |= 0x50;
3964                 pci_write_config(sc->dev, 0x79, data8, 1);
3965
3966                 /*set configuration space offset 0x70f to 0x3f*/
3967                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
3968                 Data32 &=0xC0FFFFFF;
3969                 Data32 |= (0x3F << 24);
3970                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
3971
3972                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
3973
3974                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
3975                 if (sc->re_type == MACFG_14) {
3976                         CSR_WRITE_1(sc,RE_CFG1, 0x0f);
3977
3978                         MP_WriteEPhyUshort(sc, 0x03, 0xC2F9);
3979                 } else if (sc->re_type == MACFG_15) {
3980                         CSR_WRITE_1(sc,RE_CFG1, 0x0f);
3981
3982                         MP_WriteEPhyUshort(sc, 0x01, 0x6FE5);
3983                         MP_WriteEPhyUshort(sc, 0x03, 0x07D9);
3984                 } else if (sc->re_type == MACFG_17) {
3985                         MP_WriteEPhyUshort(sc, 0x06, 0xAF35);
3986                 } else if (sc->re_type == MACFG_18) {
3987                         CSR_WRITE_1(sc, 0xF5, CSR_READ_1(sc, 0xF5)|0x04);
3988                         MP_WriteEPhyUshort(sc, 0x19, 0xEC90);
3989                         MP_WriteEPhyUshort(sc, 0x01, 0x6FE5);
3990                         MP_WriteEPhyUshort(sc, 0x03, 0x05D9);
3991                         MP_WriteEPhyUshort(sc, 0x06, 0xAF35);
3992                 } else if (sc->re_type == MACFG_19) {
3993                         if (pci_read_config(sc->dev, 0x80, 1)&3) {
3994                                 MP_WriteEPhyUshort(sc, 0x02, 0x011F);
3995                         }
3996                         CSR_WRITE_1(sc, 0xF4, CSR_READ_1(sc, 0xF4)|0x08);
3997                         CSR_WRITE_1(sc, 0xF5, CSR_READ_1(sc, 0xF5)|0x04);
3998                         MP_WriteEPhyUshort(sc, 0x19, 0xEC90);
3999                         MP_WriteEPhyUshort(sc, 0x01, 0x6FE5);
4000                         MP_WriteEPhyUshort(sc, 0x03, 0x05D9);
4001                         MP_WriteEPhyUshort(sc, 0x06, 0xAF35);
4002                 }
4003         } else if (macver == 0x3C000000) {
4004                 /*set configuration space offset 0x70f to 0x27*/
4005                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
4006                 Data32 &=0xC0FFFFFF;
4007                 Data32 |= (0x27 << 24);
4008                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
4009
4010                 CSR_WRITE_1(sc, RE_CFG1, CSR_READ_1(sc, RE_CFG1)|0x10);
4011                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
4012
4013                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
4014                 if (sc->re_type == MACFG_24) {
4015                         /*set mac register offset 0xd1 to 0xf8*/
4016                         CSR_WRITE_1(sc, RE_DBG_reg, 0xF8);
4017
4018                         data16 = MP_ReadEPhyUshort(sc, 0x02) & ~0x1800;
4019                         data16 |= 0x1000;
4020                         MP_WriteEPhyUshort(sc, 0x02, data16);
4021
4022                         data16 = MP_ReadEPhyUshort(sc, 0x03) | 0x0002;
4023                         MP_WriteEPhyUshort(sc, 0x03, data16);
4024
4025                         data16 = MP_ReadEPhyUshort(sc, 0x06) & ~0x0080;
4026                         MP_WriteEPhyUshort(sc, 0x06, data16);
4027
4028                         //disable clock request.
4029                         pci_write_config(sc->dev, 0x81, 0, 1);
4030
4031                         if (ifp->if_mtu > ETHERMTU) {
4032                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
4033                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1 << 1)); //Jumbo_en1
4034
4035                                 data8 = pci_read_config(sc->dev, 0x79, 1);
4036                                 data8 &= ~0x70;
4037                                 data8 |= 0x20;
4038                                 pci_write_config(sc->dev, 0x79, data8, 1);
4039                                 ifp->if_capenable &= ~IFCAP_HWCSUM;
4040                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
4041                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
4042
4043                         } else {
4044                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
4045                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1 << 1)); //Jumbo_en1
4046                                 data8 = pci_read_config(sc->dev, 0x79, 1);
4047                                 data8 &= ~0x70;
4048                                 data8 |= 0x50;
4049                                 pci_write_config(sc->dev, 0x79, data8, 1);
4050                                 if (sc->re_tx_cstag) {
4051                                         ifp->if_capenable |= IFCAP_TXCSUM;
4052                                         if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_25) || (sc->re_type == MACFG_26))
4053                                                 ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
4054                                         else
4055                                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
4056                                 }
4057                                 if (sc->re_rx_cstag) {
4058                                         ifp->if_capenable |= IFCAP_RXCSUM;
4059                                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
4060                                 }
4061                         }
4062
4063
4064                 } else if (sc->re_type == MACFG_25) {
4065                         data16 = MP_ReadEPhyUshort(sc, 0x01) | 0x0001;
4066                         MP_WriteEPhyUshort(sc, 0x01, data16);
4067
4068                         data16 = MP_ReadEPhyUshort(sc, 0x03) & ~0x0620;
4069                         data16 |= 0x0220;
4070                         MP_WriteEPhyUshort(sc, 0x03, data16);
4071
4072                         //disable clock request.
4073                         pci_write_config(sc->dev, 0x81, 0, 1);
4074
4075                         if (ifp->if_mtu > ETHERMTU) {
4076                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
4077                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
4078
4079                                 data8 = pci_read_config(sc->dev, 0x79, 1);
4080                                 data8 &= ~0x70;
4081                                 data8 |= 0x20;
4082                                 pci_write_config(sc->dev, 0x79, data8, 1);
4083                                 ifp->if_capenable &= ~IFCAP_HWCSUM;
4084                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
4085                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
4086
4087                         } else {
4088                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
4089                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
4090                                 data8 = pci_read_config(sc->dev, 0x79, 1);
4091                                 data8 &= ~0x70;
4092                                 data8 |= 0x50;
4093                                 pci_write_config(sc->dev, 0x79, data8, 1);
4094                                 if (sc->re_tx_cstag) {
4095                                         ifp->if_capenable |= IFCAP_TXCSUM;
4096                                         if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_25) || (sc->re_type == MACFG_26))
4097                                                 ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
4098                                         else
4099                                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
4100                                 }
4101                                 if (sc->re_rx_cstag) {
4102                                         ifp->if_capenable |= IFCAP_RXCSUM;
4103                                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
4104                                 }
4105
4106
4107                         }
4108
4109                 } else if (sc->re_type == MACFG_26) {
4110                         //disable clock request.
4111                         pci_write_config(sc->dev, 0x81, 0, 1);
4112
4113                         if (ifp->if_mtu > ETHERMTU) {
4114                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
4115                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
4116
4117                                 data8 = pci_read_config(sc->dev, 0x79, 1);
4118                                 data8 &= ~0x70;
4119                                 data8 |= 0x20;
4120                                 pci_write_config(sc->dev, 0x79, data8, 1);
4121                                 ifp->if_capenable &= ~IFCAP_HWCSUM;
4122                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
4123                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
4124                         } else {
4125                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
4126                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
4127                                 data8 = pci_read_config(sc->dev, 0x79, 1);
4128                                 data8 &= ~0x70;
4129                                 data8 |= 0x50;
4130                                 pci_write_config(sc->dev, 0x79, data8, 1);
4131                                 if (sc->re_tx_cstag) {
4132                                         ifp->if_capenable |= IFCAP_TXCSUM;
4133                                         if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_25) || (sc->re_type == MACFG_26))
4134                                                 ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
4135                                         else
4136                                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
4137                                 }
4138                                 if (sc->re_rx_cstag) {
4139                                         ifp->if_capenable |= IFCAP_RXCSUM;
4140                                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
4141                                 }
4142                         }
4143                 }
4144         } else if (macver == 0x3C800000) {
4145                 /*set configuration space offset 0x70f to 0x27*/
4146                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
4147                 Data32 &=0xC0FFFFFF;
4148                 Data32 |= (0x27 << 24);
4149                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
4150
4151                 re_eri_write(sc, 0x1EC, 1, 0x07, ERIAR_ASF);
4152
4153                 //disable clock request.
4154                 pci_write_config(sc->dev, 0x81, 0x00, 1);
4155
4156                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
4157                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
4158                 if (sc->re_type == MACFG_28)
4159                         CSR_WRITE_1(sc, 0xD1, 0x20);
4160
4161                 if (ifp->if_mtu > ETHERMTU) {
4162                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
4163                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
4164
4165                         data8 = pci_read_config(sc->dev, 0x79, 1);
4166                         data8 &= ~0x70;
4167                         data8 |= 0x20;
4168                         pci_write_config(sc->dev, 0x79, data8, 1);
4169                         ifp->if_capenable &= ~IFCAP_HWCSUM;
4170                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
4171                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
4172                 } else {
4173                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
4174                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
4175                         data8 = pci_read_config(sc->dev, 0x79, 1);
4176                         data8 &= ~0x70;
4177                         data8 |= 0x50;
4178                         pci_write_config(sc->dev, 0x79, data8, 1);
4179                         if (sc->re_tx_cstag) {
4180                                 ifp->if_capenable |= IFCAP_TXCSUM;
4181                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
4182                         }
4183                         if (sc->re_rx_cstag) {
4184                                 ifp->if_capenable |= IFCAP_RXCSUM;
4185                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
4186                         }
4187                 }
4188
4189
4190         } else if (macver == 0x28000000) {
4191                 /*set configuration space offset 0x70f to 0x13*/
4192                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
4193                 Data32 &=0xC0FFFFFF;
4194                 Data32 |= (0x13 << 24);
4195                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
4196
4197                 /* disable clock request. */
4198                 pci_write_config(sc->dev, 0x81, 0x00, 1);
4199
4200                 CSR_WRITE_1(sc, 0xD1, CSR_READ_1(sc, 0xD1) | 0x02);
4201
4202                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
4203                 CSR_WRITE_1(sc, RE_DBG_reg, CSR_READ_1(sc, RE_DBG_reg)|0x82);
4204
4205                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
4206
4207                 if (ifp->if_mtu > ETHERMTU) {
4208                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
4209                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
4210
4211                         data8 = pci_read_config(sc->dev, 0x79, 1);
4212                         data8 &= ~0x70;
4213                         data8 |= 0x20;
4214                         pci_write_config(sc->dev, 0x79, data8, 1);
4215                         ifp->if_capenable &= ~IFCAP_HWCSUM;
4216                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
4217                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
4218
4219                 } else {
4220                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
4221                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
4222                         data8 = pci_read_config(sc->dev, 0x79, 1);
4223                         data8 &= ~0x70;
4224                         data8 |= 0x50;
4225                         pci_write_config(sc->dev, 0x79, data8, 1);
4226                         if (sc->re_tx_cstag) {
4227                                 ifp->if_capenable |= IFCAP_TXCSUM;
4228                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
4229                         }
4230                         if (sc->re_rx_cstag) {
4231                                 ifp->if_capenable |= IFCAP_RXCSUM;
4232                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
4233                         }
4234                 }
4235
4236                 if (sc->re_type == MACFG_31) {
4237                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~(1<<4));
4238
4239                         MP_WriteEPhyUshort(sc, 0x01, 0x7C7F);
4240                         MP_WriteEPhyUshort(sc, 0x02, 0x011F);
4241                         MP_WriteEPhyUshort(sc, 0x06, 0xB271);
4242                         MP_WriteEPhyUshort(sc, 0x07, 0xCE00);
4243                 } else if (sc->re_type == MACFG_32) {
4244                         MP_WriteEPhyUshort(sc, 0x01, 0x7C7D);
4245                         MP_WriteEPhyUshort(sc, 0x02, 0x091F);
4246                         MP_WriteEPhyUshort(sc, 0x03, 0xC5BA);
4247                         MP_WriteEPhyUshort(sc, 0x06, 0xB279);
4248                         MP_WriteEPhyUshort(sc, 0x07, 0xAF00);
4249                         MP_WriteEPhyUshort(sc, 0x1E, 0xB8EB);
4250                 } else if (sc->re_type == MACFG_33) {
4251                         CSR_WRITE_1(sc, RE_CFG1, CSR_READ_1(sc, RE_CFG1)|0x10);
4252
4253                         MP_WriteEPhyUshort(sc, 0x01, 0x6C7F);
4254                         MP_WriteEPhyUshort(sc, 0x02, 0x011F);
4255                         ClearAndSetPCIePhyBit(sc,
4256                                               0x03,
4257                                               0xFFF0,
4258                                               0x01B0
4259                                              );
4260                         MP_WriteEPhyUshort(sc, 0x1A, 0x0546);
4261                         MP_WriteEPhyUshort(sc, 0x1C, 0x80C4);
4262                         MP_WriteEPhyUshort(sc, 0x1D, 0x78E5);
4263                         MP_WriteEPhyUshort(sc, 0x0A, 0x8100);
4264                 }
4265         } else if (macver == 0x28800000) {
4266                 /*set configuration space offset 0x70f to 0x17*/
4267                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
4268                 Data32 &=0xC0FFFFFF;
4269                 Data32 |= (0x17 << 24);
4270                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
4271
4272                 /* disable clock request. */
4273                 pci_write_config(sc->dev, 0x81, 0x00, 1);
4274
4275                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
4276                 CSR_WRITE_1(sc, RE_DBG_reg, CSR_READ_1(sc, RE_DBG_reg)|0x82);
4277
4278                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
4279
4280                 if (ifp->if_mtu > ETHERMTU) {
4281                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2); //Jumbo_en0
4282                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | (1<<1)); //Jumbo_en1
4283
4284                         data8 = pci_read_config(sc->dev, 0x79, 1);
4285                         data8 &= ~0x70;
4286                         data8 |= 0x20;
4287                         pci_write_config(sc->dev, 0x79, data8, 1);
4288                         ifp->if_capenable &= ~IFCAP_HWCSUM;
4289                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
4290                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
4291
4292                 } else {
4293                         CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2); //Jumbo_en0
4294                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~(1<<1)); //Jumbo_en1
4295                         data8 = pci_read_config(sc->dev, 0x79, 1);
4296                         data8 &= ~0x70;
4297                         data8 |= 0x50;
4298                         pci_write_config(sc->dev, 0x79, data8, 1);
4299                         if (sc->re_tx_cstag) {
4300                                 ifp->if_capenable |= IFCAP_TXCSUM;
4301                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
4302                         }
4303                         if (sc->re_rx_cstag) {
4304                                 ifp->if_capenable |= IFCAP_RXCSUM;
4305                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
4306                         }
4307                 }
4308
4309                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66) {
4310                         SetPCIePhyBit(sc, 0x0B, (BIT_3 | BIT_6));
4311
4312                         ClearAndSetPCIePhyBit(sc,
4313                                               0x19,
4314                                               BIT_5,
4315                                               (BIT_4 | BIT_6)
4316                                              );
4317
4318                         ClearAndSetPCIePhyBit(sc,
4319                                               0x0C,
4320                                               BIT_8,
4321                                               BIT_5
4322                                              );
4323
4324                         ClearPCIePhyBit(sc, 0x10, (BIT_2));
4325                 }
4326         } else if (macver == 0x2C000000) {
4327                 /*set configuration space offset 0x70f to 0x20*/
4328                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
4329                 Data32 &=0xC0FFFFFF;
4330                 Data32 |= (0x20 << 24);
4331                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
4332
4333                 CSR_WRITE_1(sc, 0xF3, CSR_READ_1(sc, 0xF3)|0x20);
4334                 CSR_WRITE_1(sc, 0xF3, CSR_READ_1(sc, 0xF3)& ~0x20);
4335
4336                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0)|0xC0);
4337                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1)|0xF3);
4338                 CSR_WRITE_1(sc, RE_CFG5, (CSR_READ_1(sc, RE_CFG5)& ~0x08)|0x01);
4339                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2)|0x80);
4340                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
4341
4342                 if (sc->re_type == MACFG_36 || sc->re_type == MACFG_37) {
4343                         /* set EPHY registers */
4344                         data16 = MP_ReadEPhyUshort(sc, 0x00) & ~0x0200;
4345                         data16 |= 0x0100;
4346                         MP_WriteEPhyUshort(sc, 0x00, data16);
4347
4348                         data16 = MP_ReadEPhyUshort(sc, 0x00);
4349                         data16 |= 0x0004;
4350                         MP_WriteEPhyUshort(sc, 0x00, data16);
4351
4352                         data16 = MP_ReadEPhyUshort(sc, 0x06) & ~0x0002;
4353                         data16 |= 0x0001;
4354                         MP_WriteEPhyUshort(sc, 0x06, data16);
4355
4356                         data16 = MP_ReadEPhyUshort(sc, 0x06);
4357                         data16 |= 0x0030;
4358                         MP_WriteEPhyUshort(sc, 0x06, data16);
4359
4360                         data16 = MP_ReadEPhyUshort(sc, 0x07);
4361                         data16 |= 0x2000;
4362                         MP_WriteEPhyUshort(sc, 0x07, data16);
4363
4364                         data16 = MP_ReadEPhyUshort(sc, 0x00);
4365                         data16 |= 0x0020;
4366                         MP_WriteEPhyUshort(sc, 0x00, data16);
4367
4368                         data16 = MP_ReadEPhyUshort(sc, 0x03) & ~0x5800;
4369                         data16 |= 0x2000;
4370                         MP_WriteEPhyUshort(sc, 0x03, data16);
4371
4372                         data16 = MP_ReadEPhyUshort(sc, 0x03);
4373                         data16 |= 0x0001;
4374                         MP_WriteEPhyUshort(sc, 0x03, data16);
4375
4376                         data16 = MP_ReadEPhyUshort(sc, 0x01) & ~0x0800;
4377                         data16 |= 0x1000;
4378                         MP_WriteEPhyUshort(sc, 0x01, data16);
4379
4380                         data16 = MP_ReadEPhyUshort(sc, 0x07);
4381                         data16 |= 0x4000;
4382                         MP_WriteEPhyUshort(sc, 0x07, data16);
4383
4384                         data16 = MP_ReadEPhyUshort(sc, 0x1E);
4385                         data16 |= 0x2000;
4386                         MP_WriteEPhyUshort(sc, 0x1E, data16);
4387
4388                         MP_WriteEPhyUshort(sc, 0x19, 0xFE6C);
4389
4390                         data16 = MP_ReadEPhyUshort(sc, 0x0A);
4391                         data16 |= 0x0040;
4392                         MP_WriteEPhyUshort(sc, 0x0A, data16);
4393
4394                         if (ifp->if_mtu > ETHERMTU) {
4395                                 CSR_WRITE_1 (sc, RE_MTPS, 0x24);
4396                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) | BIT_2);
4397                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) |0x01);
4398                                 data8 = pci_read_config(sc->dev, 0x79, 1);
4399                                 data8 &= ~0x70;
4400                                 data8 |= 0x20;
4401                                 pci_write_config(sc->dev, 0x79, data8, 1);
4402                                 ifp->if_capenable &= ~IFCAP_HWCSUM;
4403                                 CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) & ~RL_RxChkSum);
4404                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
4405                         } else {
4406                                 CSR_WRITE_1 (sc, RE_MTPS, 0x0c);
4407                                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_2);
4408                                 CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) & ~0x01);
4409                                 data8 = pci_read_config(sc->dev, 0x79, 1);
4410                                 data8 &= ~0x70;
4411                                 data8 |= 0x50;
4412                                 pci_write_config(sc->dev, 0x79, data8, 1);
4413
4414                                 if (sc->re_tx_cstag) {
4415                                         ifp->if_capenable |= IFCAP_TXCSUM;
4416                                         ifp->if_hwassist |= RE_CSUM_FEATURES;
4417                                 }
4418                                 if (sc->re_rx_cstag) {
4419                                         ifp->if_capenable |= IFCAP_RXCSUM;
4420                                         CSR_WRITE_2 (sc, RE_CPlusCmd,CSR_READ_2(sc, RE_CPlusCmd) |RL_RxChkSum);
4421                                 }
4422                         }
4423
4424                         //disable clock request.
4425                         pci_write_config(sc->dev, 0x81, 1, 1);
4426                 }
4427         } else if (macver == 0x2C800000) {
4428                 /*set configuration space offset 0x70f to 0x27*/
4429                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
4430                 Data32 &=0xC0FFFFFF;
4431                 Data32 |= (0x27 << 24);
4432                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
4433
4434                 data8 = pci_read_config(sc->dev, 0x79, 1);
4435                 data8 &= ~0x70;
4436                 data8 |= 0x50;
4437                 pci_write_config(sc->dev, 0x79, data8, 1);
4438
4439                 Data32 = CSR_READ_2(sc, RE_IDR0);
4440                 Data32 <<= 16;
4441                 Data32 &= 0xFFFF0000;
4442                 re_eri_write(sc, 0xF0, 4, Data32, ERIAR_ExGMAC);
4443                 Data32 = CSR_READ_2(sc, RE_IDR4);
4444                 Data32 <<= 16;
4445                 Data32 += CSR_READ_2(sc, RE_IDR2);
4446                 re_eri_write(sc, 0xF4, 4, Data32, ERIAR_ExGMAC);
4447
4448                 re_eri_write(sc, 0xC0, 2, 0x0000, ERIAR_ExGMAC);
4449                 re_eri_write(sc, 0xB8, 4, 0x00000000, ERIAR_ExGMAC);
4450                 re_eri_write(sc, 0xC8, 4, 0x00100002, ERIAR_ExGMAC);
4451                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
4452                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
4453                 Data32 &= ~BIT_0;
4454                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
4455                 Data32 |= BIT_0;
4456                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
4457
4458                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
4459                 Data32 |= BIT_11 | BIT_10;
4460                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
4461                 if (sc ->re_type == MACFG_39) {
4462                         Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
4463                         Data32 |= BIT_4;
4464                         re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
4465                         re_eri_write(sc, 0xCC, 4, 0x00000050, ERIAR_ExGMAC);
4466                         re_eri_write(sc, 0xD0, 4, 0x07ff0060, ERIAR_ExGMAC);
4467                 }
4468
4469                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) |BIT_7);
4470                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
4471                 CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
4472                 CSR_WRITE_1(sc, 0xF1,CSR_READ_1(sc, 0xF1) & ~ BIT_7);
4473
4474                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
4475
4476                 if (sc ->re_type == MACFG_38) {
4477                         CSR_WRITE_4(sc, 0xB0, 0xEE480010);
4478                         CSR_WRITE_1(sc, 0x1A, CSR_READ_1(sc, 0x1A) & ~(BIT_2 |BIT_3));
4479                         re_eri_write(sc, 0x1DC, 1, 0x64, ERIAR_ExGMAC);
4480
4481                         MP_WriteEPhyUshort(sc, 0x06, 0xF020);
4482                         MP_WriteEPhyUshort(sc, 0x07, 0x01FF);
4483                         MP_WriteEPhyUshort(sc, 0x00, 0x5027);
4484                         MP_WriteEPhyUshort(sc, 0x01, 0x0003);
4485                         MP_WriteEPhyUshort(sc, 0x02, 0x2D16);
4486                         MP_WriteEPhyUshort(sc, 0x03, 0x6D49);
4487                         MP_WriteEPhyUshort(sc, 0x08, 0x0006);
4488                         MP_WriteEPhyUshort(sc, 0x0A, 0x00C8);
4489                 }
4490
4491                 data16 = MP_ReadEPhyUshort(sc, 0x09);
4492                 data16 |= BIT_7;
4493                 MP_WriteEPhyUshort(sc, 0x09, data16);
4494
4495                 data16 = MP_ReadEPhyUshort(sc, 0x19);
4496                 data16 |= (BIT_2 | BIT_5 | BIT_9);
4497                 MP_WriteEPhyUshort(sc, 0x19, data16);
4498
4499                 SetPCIePhyBit(sc, 0x00, BIT_3);
4500                 ClearAndSetPCIePhyBit(sc,
4501                                       0x0C,
4502                                       (BIT_13|BIT_12|BIT_11|BIT_10|BIT_8|BIT_7|BIT_6|BIT_5|BIT_4),
4503                                       BIT_9
4504                                      );
4505
4506                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) | BIT_0);
4507                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_5 |BIT_7);
4508                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
4509
4510                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
4511                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
4512
4513                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
4514                 ifp->if_capenable &= ~IFCAP_HWCSUM ;
4515                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
4516
4517                 /* disable clock request. */
4518                 pci_write_config(sc->dev, 0x81, 0x00, 1);
4519         } else if (macver == 0x24000000) {
4520                 if (pci_read_config(sc->dev, 0x81, 1)==1) {
4521                         CSR_WRITE_1(sc, RE_DBG_reg, 0x98);
4522                         CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | 0x80);
4523                         CSR_WRITE_1(sc, RE_CFG4, CSR_READ_1(sc, RE_CFG4) | 0x04);
4524                         pci_write_config(sc->dev, 0x81, 1, 1);
4525                 }
4526                 data8 = pci_read_config(sc->dev, 0x79, 1);
4527                 data8 &= ~0x70;
4528                 data8 |= 0x50;
4529                 pci_write_config(sc->dev, 0x79, data8, 1);
4530
4531                 /*set configuration space offset 0x70f to 0x3F*/
4532                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
4533                 Data32 &=0xC0FFFFFF;
4534                 Data32 |= (0x3F << 24);
4535                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
4536
4537                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
4538
4539                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
4540
4541                 MP_WriteEPhyUshort(sc, 0x06, 0xAF25);
4542                 MP_WriteEPhyUshort(sc, 0x07, 0x8E68);
4543         } else if (macver == 0x40800000) {
4544                 if (pci_read_config(sc->dev, 0x80, 1) & 0x03) {
4545                         CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) | 1);
4546                         CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) | 0x80);
4547                         CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | 0x80);
4548                         CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | 0x80);
4549                 }
4550                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) | 0x28);
4551                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) | 0x0C);
4552                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
4553                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | 0x40);
4554                 CSR_WRITE_2(sc, 0xE0, CSR_READ_2(sc, 0xE0) & ~0xDF9C);
4555                 CSR_WRITE_1(sc, 0xD1, CSR_READ_1(sc, 0xD1) | 0x02);
4556
4557                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
4558
4559                 if (sc->re_type == MACFG_42) {
4560                         /* set EPHY registers */
4561                         SetPCIePhyBit(sc, 0x07, BIT_14);
4562                         SetPCIePhyBit(sc, 0x19, BIT_9);
4563                         SetPCIePhyBit(sc, 0x19, BIT_5);
4564                         SetPCIePhyBit(sc, 0x1E, BIT_13);
4565                         SetPCIePhyBit(sc, 0x03, BIT_0);
4566                         SetPCIePhyBit(sc, 0x19, BIT_8);
4567                         SetPCIePhyBit(sc, 0x19, BIT_2);
4568                         SetPCIePhyBit(sc, 0x0A, BIT_5);
4569                         SetPCIePhyBit(sc, 0x05, BIT_13);
4570                 }
4571                 if (sc->re_type == MACFG_43) {
4572                         SetPCIePhyBit(sc, 0x07, BIT_14);
4573                         SetPCIePhyBit(sc, 0x19, BIT_9);
4574                         SetPCIePhyBit(sc, 0x19, BIT_5);
4575                         SetPCIePhyBit(sc, 0x1E, BIT_13);
4576                         SetPCIePhyBit(sc, 0x03, BIT_0);
4577                         SetPCIePhyBit(sc, 0x19, BIT_8);
4578                         SetPCIePhyBit(sc, 0x19, BIT_2);
4579                         SetPCIePhyBit(sc, 0x0A, BIT_5);
4580                         SetPCIePhyBit(sc, 0x1E, BIT_15);
4581                         SetPCIePhyBit(sc, 0x05, BIT_13);
4582                 }
4583         } else if (macver == 0x44000000) {
4584
4585                 CSR_WRITE_2(sc, 0xE0, CSR_READ_2(sc, 0xE0) & ~0xDF9C);
4586
4587                 re_eri_write(sc, 0xC8, 4, 0x00000002, ERIAR_ExGMAC);
4588                 re_eri_write(sc, 0xE8, 4, 0x00000006, ERIAR_ExGMAC);
4589
4590                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
4591                 Data32 |= BIT_11 | BIT_10;
4592                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
4593
4594                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
4595
4596                 /* set EPHY registers */
4597                 MP_WriteEPhyUshort(sc, 0x19, 0xFF64);
4598
4599                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
4600         } else if (macver == 0x48000000) {
4601                 /*set configuration space offset 0x70f to 0x27*/
4602                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
4603                 Data32 &=0xC0FFFFFF;
4604                 Data32 |= (0x27 << 24);
4605                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
4606
4607                 data8 = pci_read_config(sc->dev, 0x79, 1);
4608                 data8 &= ~0x70;
4609                 data8 |= 0x50;
4610                 pci_write_config(sc->dev, 0x79, data8, 1);
4611
4612                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
4613                 Data32 |= BIT_11 | BIT_10;
4614                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
4615                 re_eri_write(sc, 0xC0, 2, 0x0000, ERIAR_ExGMAC);
4616                 re_eri_write(sc, 0xB8, 4, 0x00000000, ERIAR_ExGMAC);
4617                 re_eri_write(sc, 0xC8, 4, 0x00100002, ERIAR_ExGMAC);
4618                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
4619                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
4620                 Data32 &= ~BIT_0;
4621                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
4622                 Data32 |= BIT_0;
4623                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
4624                 Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
4625                 Data32 |= BIT_4;
4626                 re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
4627                 re_eri_write(sc, 0xCC, 4, 0x00000050, ERIAR_ExGMAC);
4628                 re_eri_write(sc, 0xD0, 4, 0x00000060, ERIAR_ExGMAC);
4629                 Data32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
4630                 Data32 |= BIT_4;
4631                 re_eri_write(sc, 0x1D0, 4, Data32, ERIAR_ExGMAC);
4632
4633                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) | BIT_7);
4634                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
4635                 CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
4636
4637                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
4638
4639                 if (sc->re_type == MACFG_50) {
4640                         data16 = MP_ReadEPhyUshort(sc, 0x06);
4641                         data16 &= ~(BIT_7 | BIT_6);
4642                         data16 |= BIT_5;
4643                         MP_WriteEPhyUshort(sc, 0x06, data16);
4644
4645                         data16 = MP_ReadEPhyUshort(sc, 0x08);
4646                         data16 &= ~BIT_0;
4647                         data16 |= BIT_1;
4648                         MP_WriteEPhyUshort(sc, 0x08, data16);
4649                 }
4650
4651                 data16 = MP_ReadEPhyUshort(sc, 0x09);
4652                 data16 |= BIT_7;
4653                 MP_WriteEPhyUshort(sc, 0x09, data16);
4654
4655                 data16 = MP_ReadEPhyUshort(sc, 0x19);
4656                 data16 |= (BIT_2 | BIT_5 | BIT_9);
4657                 MP_WriteEPhyUshort(sc, 0x19, data16);
4658
4659                 SetPCIePhyBit(sc, 0x00, BIT_3);
4660                 ClearAndSetPCIePhyBit(sc,
4661                                       0x0C,
4662                                       (BIT_13|BIT_12|BIT_11|BIT_10|BIT_8|BIT_7|BIT_6|BIT_5|BIT_4),
4663                                       BIT_9
4664                                      );
4665
4666                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) | BIT_0);
4667                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_7);
4668                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
4669
4670                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
4671                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
4672
4673                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
4674
4675                 if (ifp->if_mtu > ETHERMTU) {
4676                         ifp->if_capenable &= ~IFCAP_HWCSUM ;
4677                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
4678                 } else {
4679                         if (sc->re_tx_cstag) {
4680                                 ifp->if_capenable |= IFCAP_TXCSUM;
4681                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
4682                         }
4683                         if (sc->re_rx_cstag) {
4684                                 ifp->if_capenable |= IFCAP_RXCSUM;
4685                         }
4686                 }
4687
4688                 /* disable clock request. */
4689                 pci_write_config(sc->dev, 0x81, 0x00, 1);
4690         } else if (macver == 0x48800000) {
4691                 /*set configuration space offset 0x70f to 0x27*/
4692                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
4693                 Data32 &=0xC0FFFFFF;
4694                 Data32 |= (0x27 << 24);
4695                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
4696
4697                 data8 = pci_read_config(sc->dev, 0x79, 1);
4698                 data8 &= ~0x70;
4699                 data8 |= 0x50;
4700                 pci_write_config(sc->dev, 0x79, data8, 1);
4701
4702                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
4703                 Data32 |= BIT_11 | BIT_10;
4704                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
4705                 re_eri_write(sc, 0xC0, 2, 0x0000, ERIAR_ExGMAC);
4706                 re_eri_write(sc, 0xB8, 4, 0x00000000, ERIAR_ExGMAC);
4707                 re_eri_write(sc, 0xC8, 4, 0x00100002, ERIAR_ExGMAC);
4708                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
4709                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
4710                 Data32 &= ~BIT_0;
4711                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
4712                 Data32 |= BIT_0;
4713                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
4714                 Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
4715                 Data32 |= BIT_4;
4716                 re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
4717                 re_eri_write(sc, 0xCC, 4, 0x00000050, ERIAR_ExGMAC);
4718                 re_eri_write(sc, 0xD0, 4, 0x00000060, ERIAR_ExGMAC);
4719                 Data32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
4720                 Data32 |= BIT_4;
4721                 re_eri_write(sc, 0x1D0, 4, Data32, ERIAR_ExGMAC);
4722
4723                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) | BIT_7);
4724                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
4725 //              CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
4726
4727                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
4728
4729                 data16 = MP_ReadEPhyUshort(sc, 0x06);
4730                 data16 &= ~(BIT_7 | BIT_6);
4731                 data16 |= BIT_5;
4732                 MP_WriteEPhyUshort(sc, 0x06, data16);
4733
4734                 MP_WriteEPhyUshort(sc, 0x0f, 0x5200);
4735
4736                 data16 = MP_ReadEPhyUshort(sc, 0x1e);
4737                 data16 |= BIT_14;
4738                 MP_WriteEPhyUshort(sc, 0x1e, data16);
4739
4740                 data16 = MP_ReadEPhyUshort(sc, 0x19);
4741                 data16 |= (BIT_2 | BIT_5 | BIT_9);
4742                 MP_WriteEPhyUshort(sc, 0x19, data16);
4743
4744                 SetPCIePhyBit(sc, 0x00, BIT_3);
4745                 ClearAndSetPCIePhyBit(sc,
4746                                       0x0C,
4747                                       (BIT_13|BIT_12|BIT_11|BIT_10|BIT_8|BIT_7|BIT_6|BIT_5|BIT_4),
4748                                       BIT_9
4749                                      );
4750
4751                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) | BIT_0);
4752                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_7);
4753                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
4754
4755                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
4756                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
4757
4758                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
4759
4760                 if (ifp->if_mtu > ETHERMTU) {
4761                         ifp->if_capenable &= ~IFCAP_HWCSUM ;
4762                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
4763                 } else {
4764                         if (sc->re_tx_cstag) {
4765                                 ifp->if_capenable |= IFCAP_TXCSUM;
4766                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
4767                         }
4768                         if (sc->re_rx_cstag) {
4769                                 ifp->if_capenable |= IFCAP_RXCSUM;
4770                         }
4771                 }
4772
4773                 /* disable clock request. */
4774                 pci_write_config(sc->dev, 0x81, 0x00, 1);
4775         } else if (macver == 0x44800000) {
4776                 if (pci_read_config(sc->dev, 0x80, 1) & 0x03) {
4777                         CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) | 1);
4778                         CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) | 0x80);
4779                         CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | 0x80);
4780                         CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | 0x80);
4781                 }
4782                 CSR_WRITE_1(sc, 0xF1, CSR_READ_1(sc, 0xF1) | 0x28);
4783                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) | 0x0C);
4784                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
4785                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | 0x40);
4786                 CSR_WRITE_2(sc, 0xE0, CSR_READ_2(sc, 0xE0) & ~0xDF9C);
4787
4788                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
4789         } else if (macver == 0x4C000000 || macver == 0x50800000 ||
4790                    macver == 0x5C800000 || macver == 0x54000000) {
4791                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) & ~BIT_0);
4792                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) & ~BIT_7);
4793                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_5);
4794
4795                 if (sc->re_type == MACFG_59) {
4796                         MP_WriteMcuAccessRegWord(sc, 0xD3C0, 0x03F8);
4797                         MP_WriteMcuAccessRegWord(sc, 0xD3C2, 0x0000);
4798                 }
4799
4800                 if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
4801                         MP_WriteMcuAccessRegWord(sc, 0xD400, MP_ReadMcuAccessRegWord(sc, 0xD400) & ~(BIT_0));
4802
4803                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE63E);
4804                         data16 &= ~(BIT_3 | BIT_2 | BIT_1);
4805                         MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
4806                         data16 |= (BIT_0);
4807                         MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
4808                         data16 &= ~(BIT_0);
4809                         MP_WriteMcuAccessRegWord(sc, 0xE63E, data16);
4810                         MP_WriteMcuAccessRegWord(sc, 0xC094, 0x0);
4811                         MP_WriteMcuAccessRegWord(sc, 0xC09E, 0x0);
4812
4813                         MP_WriteMcuAccessRegWord(sc, 0xE098, 0x0AA2);
4814                 }
4815
4816                 /*set configuration space offset 0x70f to 0x17*/
4817                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
4818                 Data32 &=0xC0FFFFFF;
4819                 Data32 |= (0x17 << 24);
4820                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
4821
4822                 data8 = pci_read_config(sc->dev, 0x79, 1);
4823                 data8 &= ~0x70;
4824                 data8 |= 0x50;
4825                 pci_write_config(sc->dev, 0x79, data8, 1);
4826
4827                 if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57) {
4828                         Data32 = MP_ReadPciEConfigSpace(sc, 0x2710);
4829                         Data32 &=0xFFFF0FFF;
4830                         Data32 |= (0x04 << 12);
4831                         MP_WritePciEConfigSpace(sc, 0x2710, Data32);
4832                 }
4833
4834                 if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
4835                         Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
4836                         Data32 |= (BIT_8 | BIT_9 | BIT_10 | BIT_11 | BIT_12);
4837                         re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
4838
4839                         Data32 = re_eri_read(sc, 0xDC, 4, ERIAR_ExGMAC);
4840                         Data32 |= (BIT_2| BIT_3 | BIT_4);
4841                         re_eri_write(sc, 0xDC, 4, Data32, ERIAR_ExGMAC);
4842                 } else {
4843                         Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
4844                         Data32 |= (BIT_7 | BIT_8 | BIT_9 | BIT_10 | BIT_11 | BIT_12);
4845                         re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
4846                 }
4847
4848                 re_eri_write(sc, 0xC8, 4, 0x00080002, ERIAR_ExGMAC);
4849                 re_eri_write(sc, 0xCC, 1, 0x38, ERIAR_ExGMAC);
4850                 re_eri_write(sc, 0xD0, 1, 0x48, ERIAR_ExGMAC);
4851                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
4852
4853                 re_eri_write(sc, 0x5F0, 4, 0x4F87, ERIAR_ExGMAC);
4854
4855                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
4856                 Data32 &= ~BIT_0;
4857                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
4858                 Data32 |= BIT_0;
4859                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
4860
4861                 Data32 = re_eri_read(sc, 0x2FC, 4, ERIAR_ExGMAC);
4862                 Data32 &= ~(BIT_0 | BIT_1 | BIT_2);
4863                 Data32 |= (BIT_0);
4864                 re_eri_write(sc, 0x2FC, 4, Data32, ERIAR_ExGMAC);
4865
4866                 Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
4867                 Data32 &= ~BIT_12;
4868                 re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
4869
4870                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) | BIT_7);
4871                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
4872                 CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
4873
4874                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
4875
4876                 if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57) {
4877                         ClearPCIePhyBit(sc, 0x00, BIT_3);
4878                         ClearAndSetPCIePhyBit(sc,
4879                                               0x0C,
4880                                               (BIT_13|BIT_12|BIT_10|BIT_9|BIT_8|BIT_7|BIT_6|BIT_4),
4881                                               (BIT_11|BIT_5)
4882                                              );
4883                         SetPCIePhyBit(sc, 0x1E, BIT_0);
4884                         ClearPCIePhyBit(sc, 0x19, BIT_15);
4885                 }  else if (sc->re_type == MACFG_58) {
4886                         SetPCIePhyBit(sc, 0x00, (BIT_3));
4887                         ClearAndSetPCIePhyBit(sc,
4888                                               0x0C,
4889                                               (BIT_13 | BIT_12 | BIT_11 | BIT_10 | BIT_8 | BIT_7 | BIT_6 | BIT_5 | BIT_4),
4890                                               BIT_9
4891                                              );
4892                 }  else if (sc->re_type == MACFG_59) {
4893                         ClearPCIePhyBit(sc, 0x00, BIT_3);
4894                         ClearAndSetPCIePhyBit(sc,
4895                                               0x0C,
4896                                               (BIT_13 | BIT_12 | BIT_10 | BIT_9 | BIT_8 | BIT_7 | BIT_6 | BIT_4),
4897                                               (BIT_5 | BIT_11)
4898                                              );
4899
4900                         SetPCIePhyBit(sc, 0x1E, BIT_0);
4901                         ClearPCIePhyBit(sc, 0x19, BIT_15);
4902                         MP_WriteEPhyUshort(sc, 0x19, 0x7C00);
4903                         MP_WriteEPhyUshort(sc, 0x1E, 0x20EB);
4904                         MP_WriteEPhyUshort(sc, 0x0D, 0x1666);
4905                         MP_WriteEPhyUshort(sc, 0x00, 0x10A3);
4906
4907                         MP_WriteEPhyUshort(sc, 0x06, 0xF050);
4908                 } else if (sc->re_type == MACFG_60) {
4909                         ClearPCIePhyBit(sc, 0x00, BIT_3);
4910                         ClearAndSetPCIePhyBit(sc,
4911                                               0x0C,
4912                                               (BIT_13 | BIT_12 | BIT_10 | BIT_9 | BIT_8 | BIT_7 | BIT_6 | BIT_4),
4913                                               (BIT_5 | BIT_11)
4914                                              );
4915                         SetPCIePhyBit(sc, 0x1E, BIT_0);
4916                         ClearPCIePhyBit(sc, 0x19, BIT_15);
4917
4918                         ClearPCIePhyBit(sc, 0x19, (BIT_5 | BIT_0));
4919
4920                         SetPCIePhyBit(sc, 0x1E, BIT_13);
4921                         ClearPCIePhyBit(sc, 0x0D, BIT_8);
4922                         SetPCIePhyBit(sc, 0x0D, BIT_9);
4923                         SetPCIePhyBit(sc, 0x00, BIT_7);
4924
4925                         SetPCIePhyBit(sc, 0x06, BIT_4);
4926                 } else if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
4927                         ClearPCIePhyBit(sc, 0x1E, BIT_11);
4928
4929                         SetPCIePhyBit(sc, 0x1E, BIT_0);
4930                         SetPCIePhyBit(sc, 0x1D, BIT_11);
4931
4932                         MP_WriteEPhyUshort(sc, 0x05, 0x2089);
4933                         MP_WriteEPhyUshort(sc, 0x06, 0x5881);
4934
4935                         MP_WriteEPhyUshort(sc, 0x04, 0x154A);
4936                         MP_WriteEPhyUshort(sc, 0x01, 0x068B);
4937                 }
4938
4939                 if (sc->re_type == MACFG_60) {
4940                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3C0);
4941                         data16 &= 0xF000;
4942                         data16 |= 0x3A9;
4943                         MP_WriteMcuAccessRegWord(sc, 0xD3C0, data16);
4944
4945                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3C2);
4946                         data16 &= 0xFF00;
4947                         MP_WriteMcuAccessRegWord(sc, 0xD3C2, data16);
4948
4949                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3C4);
4950                         data16 |= (BIT_0);
4951                         MP_WriteMcuAccessRegWord(sc, 0xD3C4, data16);
4952                 } else if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
4953                         if (sc->RequireAdjustUpsTxLinkPulseTiming) {
4954                                 data16 = MP_ReadMcuAccessRegWord(sc, 0xD412);
4955                                 data16 &= ~(0x0FFF);
4956                                 data16 |= sc->SwrCnt1msIni ;
4957                                 MP_WriteMcuAccessRegWord(sc, 0xD412, data16);
4958                         }
4959
4960                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE056);
4961                         data16 &= ~(BIT_7 | BIT_6 | BIT_5 | BIT_4);
4962                         data16 |= (BIT_6 | BIT_5 | BIT_4);
4963                         MP_WriteMcuAccessRegWord(sc, 0xE056, data16);
4964
4965                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE052);
4966                         data16 &= ~(BIT_14 | BIT_13);
4967                         data16 |= BIT_15;
4968                         data16 |= BIT_3;
4969                         MP_WriteMcuAccessRegWord(sc, 0xE052, data16);
4970
4971                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD420);
4972                         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);
4973                         data16 |= 0x47F;
4974                         MP_WriteMcuAccessRegWord(sc, 0xD420, data16);
4975
4976                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE0D6);
4977                         data16 &= ~(BIT_8 | BIT_7 | BIT_6 | BIT_5 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0);
4978                         data16 |= 0x17F;
4979                         MP_WriteMcuAccessRegWord(sc, 0xE0D6, data16);
4980                 }
4981
4982
4983                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) | BIT_0);
4984                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_7);
4985                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
4986
4987                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
4988                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
4989
4990                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~BIT_3);
4991
4992                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
4993
4994                 if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
4995                     sc->re_type == MACFG_58 || sc->re_type == MACFG_59) {
4996                         MP_WriteMcuAccessRegWord(sc, 0xC140, 0xFFFF);
4997                 } else if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
4998                         MP_WriteMcuAccessRegWord(sc, 0xC140, 0xFFFF);
4999                         MP_WriteMcuAccessRegWord(sc, 0xC142, 0xFFFF);
5000                 }
5001
5002                 if (ifp->if_mtu > ETHERMTU) {
5003                         ifp->if_capenable &= ~IFCAP_HWCSUM ;
5004                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5005                 } else {
5006                         if (sc->re_tx_cstag) {
5007                                 ifp->if_capenable |= IFCAP_TXCSUM;
5008                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5009                         }
5010                         if (sc->re_rx_cstag) {
5011                                 ifp->if_capenable |= IFCAP_RXCSUM;
5012                         }
5013                 }
5014
5015                 /* disable clock request. */
5016                 pci_write_config(sc->dev, 0x81, 0x00, 1);
5017         } else if (macver == 0x50000000) {
5018
5019                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) & ~BIT_0);
5020                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) & ~BIT_7);
5021
5022                 /*set configuration space offset 0x70f to 0x17*/
5023                 Data32 = MP_ReadPciEConfigSpace(sc, 0x870c);
5024                 Data32 &=0xC0FFFFFF;
5025                 Data32 |= (0x17 << 24);
5026                 MP_WritePciEConfigSpace(sc, 0x870c, Data32);
5027
5028                 data8 = pci_read_config(sc->dev, 0x79, 1);
5029                 data8 &= ~0x70;
5030                 data8 |= 0x50;
5031                 pci_write_config(sc->dev, 0x79, data8, 1);
5032
5033                 Data32 = re_eri_read(sc, 0xD4, 4, ERIAR_ExGMAC);
5034                 Data32 |= BIT_7 | BIT_8 | BIT_9 | BIT_10 | BIT_11 | BIT_12;
5035                 re_eri_write(sc, 0xD4, 4, Data32, ERIAR_ExGMAC);
5036
5037                 re_eri_write(sc, 0xC8, 4, 0x00080002, ERIAR_ExGMAC);
5038                 re_eri_write(sc, 0xCC, 1, 0x2F, ERIAR_ExGMAC);
5039                 re_eri_write(sc, 0xD0, 1, 0x5F, ERIAR_ExGMAC);
5040                 re_eri_write(sc, 0xE8, 4, 0x00100006, ERIAR_ExGMAC);
5041
5042                 if (sc->re_type == MACFG_62 || sc->re_type == MACFG_67) {
5043                         OOB_mutex_lock(sc);
5044                         re_eri_write(sc, 0x5F0, 4, 0x4F87, ERIAR_ExGMAC);
5045                         OOB_mutex_unlock(sc);
5046                 }
5047
5048                 Data32 = re_eri_read(sc, 0xdc, 4, ERIAR_ExGMAC);
5049                 Data32 &= ~BIT_0;
5050                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
5051                 Data32 |= BIT_0;
5052                 re_eri_write(sc, 0xdc, 1, Data32, ERIAR_ExGMAC);
5053
5054                 Data32 = re_eri_read(sc, 0x2FC, 4, ERIAR_ExGMAC);
5055                 Data32 &= ~(BIT_0 | BIT_1 | BIT_2);
5056                 Data32 |= (BIT_0);
5057                 re_eri_write(sc, 0x2FC, 4, Data32, ERIAR_ExGMAC);
5058
5059                 Data32 = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
5060                 Data32 &= ~BIT_12;
5061                 re_eri_write(sc, 0x1B0, 4, Data32, ERIAR_ExGMAC);
5062
5063                 CSR_WRITE_4(sc, RE_TXCFG, CSR_READ_4(sc, RE_TXCFG) | BIT_7);
5064                 CSR_WRITE_1(sc, 0xD3, CSR_READ_1(sc, 0xD3) & ~BIT_7);
5065                 CSR_WRITE_1(sc, 0x1B, CSR_READ_1(sc, 0x1B) & ~0x07);
5066
5067                 CSR_WRITE_2 (sc, RE_CPlusCmd, 0x2060);
5068
5069                 if (sc->re_type == MACFG_61) {
5070                         MP_WriteEPhyUshort(sc, 0x00, 0x10AB);
5071                         MP_WriteEPhyUshort(sc, 0x06, 0xF030);
5072                         MP_WriteEPhyUshort(sc, 0x08, 0x2006);
5073                         MP_WriteEPhyUshort(sc, 0x0D, 0x1666);
5074                         ClearPCIePhyBit(sc, 0x0C, (BIT_13 | BIT_12 | BIT_11 | BIT_10 | BIT_9 | BIT_8 | BIT_7 | BIT_6 | BIT_5 | BIT_4));
5075                 }  else if (sc->re_type == MACFG_62) {
5076                         MP_WriteEPhyUshort(sc, 0x00, 0x10A3);
5077                         MP_WriteEPhyUshort(sc, 0x19, 0xFC00);
5078                         MP_WriteEPhyUshort(sc, 0x1E, 0x20EA);
5079                 } else if (sc->re_type == MACFG_67) {
5080                         SetPCIePhyBit(sc, 0x00, BIT_7);
5081                         ClearAndSetPCIePhyBit(sc,
5082                                               0x0D,
5083                                               BIT_8,
5084                                               BIT_9
5085                                              );
5086                         ClearPCIePhyBit(sc, 0x19, (BIT_15 | BIT_5 | BIT_0));
5087                         SetPCIePhyBit(sc, 0x1E, BIT_13);
5088                 }
5089
5090
5091                 CSR_WRITE_1(sc, RE_CFG5, CSR_READ_1(sc, RE_CFG5) | BIT_0);
5092                 CSR_WRITE_1(sc, RE_CFG2, CSR_READ_1(sc, RE_CFG2) | BIT_7);
5093                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_0);
5094
5095                 CSR_WRITE_1(sc, 0xD0, CSR_READ_1(sc, 0xD0) | BIT_6);
5096                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) | BIT_6);
5097
5098                 CSR_WRITE_1(sc, 0xF2, CSR_READ_1(sc, 0xF2) & ~BIT_3);
5099
5100                 CSR_WRITE_1 (sc, RE_MTPS, 0x27);
5101
5102                 if (sc->re_type == MACFG_67) {
5103                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3E2);
5104                         data16 &= 0xF000;
5105                         data16 |= 0x3A9;
5106                         MP_WriteMcuAccessRegWord(sc, 0xD3E2, data16);
5107
5108                         data16 = MP_ReadMcuAccessRegWord(sc, 0xD3E4);
5109                         data16 &= 0xFF00;
5110                         MP_WriteMcuAccessRegWord(sc, 0xD3E4, data16);
5111
5112                         data16 = MP_ReadMcuAccessRegWord(sc, 0xE860);
5113                         data16 |= BIT_7;
5114                         MP_WriteMcuAccessRegWord(sc, 0xE860, data16);
5115                 }
5116
5117                 MP_WriteMcuAccessRegWord(sc, 0xC140, 0xFFFF);
5118                 MP_WriteMcuAccessRegWord(sc, 0xC142, 0xFFFF);
5119
5120                 if (ifp->if_mtu > ETHERMTU) {
5121                         ifp->if_capenable &= ~IFCAP_HWCSUM ;
5122                         ifp->if_hwassist &= ~RE_CSUM_FEATURES;
5123                 } else {
5124                         if (sc->re_tx_cstag) {
5125                                 ifp->if_capenable |= IFCAP_TXCSUM;
5126                                 ifp->if_hwassist |= RE_CSUM_FEATURES;
5127                         }
5128                         if (sc->re_rx_cstag) {
5129                                 ifp->if_capenable |= IFCAP_RXCSUM;
5130                         }
5131                 }
5132
5133                 /* disable clock request. */
5134                 pci_write_config(sc->dev, 0x81, 0x00, 1);
5135         }
5136
5137         //clear io_rdy_l23
5138         switch (sc->re_type) {
5139         case MACFG_42:
5140         case MACFG_43:
5141         case MACFG_52:
5142         case MACFG_53:
5143         case MACFG_54:
5144         case MACFG_55:
5145         case MACFG_56:
5146         case MACFG_57:
5147         case MACFG_58:
5148         case MACFG_59:
5149         case MACFG_60:
5150         case MACFG_61:
5151         case MACFG_62:
5152         case MACFG_67:
5153         case MACFG_68:
5154         case MACFG_69:
5155                 CSR_WRITE_1(sc, RE_CFG3, CSR_READ_1(sc, RE_CFG3) & ~BIT_1);
5156                 break;
5157         }
5158
5159         //clear wol
5160         re_clrwol(sc);
5161
5162         data16 = CSR_READ_2(sc, RE_CPlusCmd);
5163         if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) != 0)
5164                 data16 |= RL_CPLUSCMD_VLANSTRIP;
5165         else
5166                 data16 &= ~RL_CPLUSCMD_VLANSTRIP;
5167
5168         if ((ifp->if_capenable & IFCAP_RXCSUM) != 0)
5169                 data16 |= RL_RxChkSum;
5170         else
5171                 data16 &= ~RL_RxChkSum;
5172         CSR_WRITE_2 (sc, RE_CPlusCmd, data16);
5173
5174         CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_OFF);
5175         //CSR_WRITE_1(sc, 0xec, 0x3f);
5176
5177         if (sc->re_device_id == RT_DEVICEID_8169 || sc->re_device_id == RT_DEVICEID_8169SC) {
5178                 /* Enable transmit and receive.*/
5179                 CSR_WRITE_1(sc, RE_COMMAND, RE_CMD_TX_ENB | RE_CMD_RX_ENB);
5180
5181                 /* Set the initial TX configuration.*/
5182                 CSR_WRITE_4(sc, RE_TXCFG, RE_TXCFG_CONFIG);
5183
5184                 /* Set the initial RX configuration.*/
5185                 /*
5186                  * Program the multicast filter, if necessary.
5187                  */
5188                 re_set_rx_packet_filter(sc);
5189         } else {
5190                 /* Set the initial RX configuration.*/
5191                 /*
5192                  * Program the multicast filter, if necessary.
5193                  */
5194                 re_set_rx_packet_filter(sc);
5195
5196                 /* Enable transmit and receive.*/
5197                 CSR_WRITE_1(sc, RE_COMMAND, RE_CMD_TX_ENB | RE_CMD_RX_ENB);
5198         }
5199
5200 #ifndef __DragonFly__
5201         ifp->if_drv_flags |= IFF_DRV_RUNNING;
5202         ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
5203
5204         /*
5205         * Enable interrupts.
5206         */
5207         CSR_WRITE_2(sc, RE_IMR, RE_INTRS);
5208 #endif
5209 }
5210
5211 static void re_init_unlock(void *xsc)   /* Software & Hardware Initialize */
5212 {
5213         struct re_softc         *sc = xsc;
5214         struct ifnet            *ifp;
5215 #ifndef __DragonFly__
5216 #if OS_VER < VERSION(6,0)
5217         int                     i;
5218 #endif
5219 #endif  /* !__DragonFly__ */
5220         union {
5221                 uint32_t align_dummy;
5222                 u_char eaddr[ETHER_ADDR_LEN];
5223         } eaddr;
5224
5225         ifp = RE_GET_IFNET(sc);
5226
5227 #ifndef __DragonFly__
5228         /*
5229          * Cancel pending I/O and free all RX/TX buffers.
5230          */
5231         re_stop(sc);
5232 #endif  /* !__DragonFly__ */
5233
5234         /* Copy MAC address on stack to align. */
5235 #ifndef __DragonFly__
5236 #if OS_VER < VERSION(6,0)
5237         bcopy((char *)&sc->arpcom.ac_enaddr, eaddr.eaddr, ETHER_ADDR_LEN);
5238 #elif OS_VER < VERSION(7,0)
5239         bcopy(IFP2ENADDR(ifp), eaddr.eaddr, ETHER_ADDR_LEN);
5240 #else
5241         bcopy(IF_LLADDR(ifp), eaddr.eaddr, ETHER_ADDR_LEN);
5242 #endif
5243 #else   /* __DragonFly__ */
5244         bcopy(IF_LLADDR(ifp), eaddr.eaddr, ETHER_ADDR_LEN);
5245 #endif  /* !__DragonFly__ */
5246
5247         /* Init our MAC address */
5248         CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_WRITECFG);
5249         CSR_WRITE_4(sc, RE_IDR0,
5250                     htole32(*(u_int32_t *)(&eaddr.eaddr[0])));
5251         CSR_WRITE_4(sc, RE_IDR4,
5252                     htole32(*(u_int32_t *)(&eaddr.eaddr[4])));
5253
5254         switch (sc->re_type) {
5255         case MACFG_36:
5256         case MACFG_37:
5257         case MACFG_54:
5258         case MACFG_55:
5259                 CSR_WRITE_4(sc, RE_SecMAC0,
5260                             htole32(*(u_int32_t *)(&eaddr.eaddr[0])));
5261                 CSR_WRITE_2(sc, RE_SecMAC4,
5262                             htole16(*(u_int16_t *)(&eaddr.eaddr[4])));
5263                 break;
5264         }
5265
5266         CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_OFF);
5267
5268 #ifndef __DragonFly__
5269         re_hw_start_unlock(sc);
5270 #endif
5271
5272         return;
5273 }
5274
5275 #ifndef __DragonFly__
5276 static void re_init(void *xsc)          /* Software & Hardware Initialize */
5277 {
5278         struct re_softc         *sc = xsc;
5279         struct ifnet            *ifp;
5280
5281         RE_LOCK(sc);
5282         ifp = RE_GET_IFNET(sc);
5283
5284         if (re_link_ok(sc)) {
5285                 sc->link_state = LINK_STATE_UP;
5286                 re_link_state_change(ifp, sc->link_state);
5287                 re_link_on_patch(sc);
5288         }
5289
5290         sc->re_link_chg_det = 1;
5291         re_start_timer(sc);
5292
5293         RE_UNLOCK(sc);
5294 }
5295
5296 /*
5297  * Initialize the transmit descriptors.
5298  */
5299 static int re_var_init(struct re_softc *sc)
5300 {
5301         int                     i;
5302         union RxDesc *rxptr;
5303         union TxDesc *txptr;
5304
5305         sc->re_desc.rx_cur_index = 0;
5306         sc->re_desc.rx_last_index = 0;
5307         rxptr = sc->re_desc.rx_desc;
5308         for (i = 0; i < RE_RX_BUF_NUM; i++) {
5309                 memset(&rxptr[i], 0, sizeof(union RxDesc));
5310
5311                 /* Init the RX buffer pointer register. */
5312                 bus_dmamap_load(sc->re_desc.re_rx_mtag,
5313                                 sc->re_desc.re_rx_dmamap[i],
5314                                 sc->re_desc.rx_buf[i]->m_data, sc->re_rx_desc_buf_sz,
5315                                 re_rx_dma_map_buf,
5316                                 &rxptr[i],
5317                                 0);
5318                 bus_dmamap_sync(sc->re_desc.re_rx_mtag,
5319                                 sc->re_desc.re_rx_dmamap[i],
5320                                 BUS_DMASYNC_PREREAD);
5321
5322                 rxptr[i].ul[0] = htole32(sc->re_rx_desc_buf_sz);
5323                 if (i == (RE_RX_BUF_NUM - 1))
5324                         rxptr[i].ul[0] |= htole32(RL_RDESC_CMD_EOR);
5325                 rxptr[i].ul[0] |= htole32(RL_RDESC_CMD_OWN);
5326         }
5327
5328         bus_dmamap_load(sc->re_desc.rx_desc_tag,
5329                         sc->re_desc.rx_desc_dmamap,
5330                         sc->re_desc.rx_desc,
5331                         sizeof(union RxDesc)*RE_RX_BUF_NUM,
5332                         re_dma_map_rxdesc,
5333                         sc,
5334                         0);
5335         bus_dmamap_sync(sc->re_desc.rx_desc_tag,
5336                         sc->re_desc.rx_desc_dmamap,
5337                         BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
5338
5339         sc->re_desc.tx_cur_index = 0;
5340         sc->re_desc.tx_last_index = 0;
5341         txptr = sc->re_desc.tx_desc;
5342         for (i = 0; i < RE_TX_BUF_NUM; i++) {
5343                 memset(&txptr[i], 0, sizeof(union TxDesc));
5344                 if (i == (RE_TX_BUF_NUM - 1))
5345                         txptr[i].ul[0] = htole32(RL_TDESC_CMD_EOR);
5346         }
5347
5348         bus_dmamap_load(sc->re_desc.tx_desc_tag,
5349                         sc->re_desc.tx_desc_dmamap,
5350                         sc->re_desc.tx_desc,
5351                         sizeof(union RxDesc) * RE_TX_BUF_NUM,
5352                         re_dma_map_txdesc,
5353                         sc,
5354                         0);
5355         bus_dmamap_sync(sc->re_desc.tx_desc_tag,
5356                         sc->re_desc.tx_desc_dmamap,
5357                         BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
5358
5359         return 0;
5360 }
5361 #endif  /* !__DragonFly__ */
5362
5363 static void re_reset(struct re_softc *sc)
5364 {
5365         register int            i;
5366
5367         CSR_WRITE_4(sc, RE_RXCFG, CSR_READ_4(sc, RE_RXCFG)& ~0x3F);
5368
5369         switch (sc->re_type) {
5370         case MACFG_3:
5371         case MACFG_4:
5372         case MACFG_5:
5373         case MACFG_6:
5374                 DELAY(10000);
5375                 break;
5376         case MACFG_11:
5377         case MACFG_12:
5378         case MACFG_13:
5379         case MACFG_14:
5380         case MACFG_15:
5381         case MACFG_16:
5382         case MACFG_17:
5383         case MACFG_18:
5384         case MACFG_19:
5385         case MACFG_21:
5386         case MACFG_22:
5387         case MACFG_23:
5388         case MACFG_24:
5389         case MACFG_25:
5390         case MACFG_26:
5391         case MACFG_27:
5392         case MACFG_28:
5393         case MACFG_31:
5394         case MACFG_32:
5395         case MACFG_33:
5396         case MACFG_36:
5397         case MACFG_37:
5398         case MACFG_41:
5399         case MACFG_42:
5400         case MACFG_43:
5401         case MACFG_54:
5402         case MACFG_55:
5403         case MACFG_63:
5404         case MACFG_64:
5405         case MACFG_65:
5406         case MACFG_66:
5407                 CSR_WRITE_1(sc, RE_COMMAND, 0x8C);
5408                 break;
5409         case MACFG_38:
5410         case MACFG_39:
5411         case MACFG_50:
5412         case MACFG_51:
5413         case MACFG_52:
5414         case MACFG_53:
5415                 CSR_WRITE_1(sc, RE_COMMAND, 0x8C);
5416                 while (!(CSR_READ_4(sc,RE_TXCFG) & BIT_11)) DELAY(100);
5417                 break;
5418         case MACFG_56:
5419         case MACFG_57:
5420         case MACFG_58:
5421         case MACFG_59:
5422         case MACFG_60:
5423         case MACFG_61:
5424         case MACFG_62:
5425         case MACFG_67:
5426         case MACFG_68:
5427         case MACFG_69:
5428                 DELAY(2000);
5429                 break;
5430         default:
5431                 DELAY(10000);
5432                 break;
5433         }
5434         DELAY(200);
5435         CSR_WRITE_1(sc, RE_COMMAND, RE_CMD_RESET);
5436
5437         for (i = 0; i < RE_TIMEOUT; i++) {
5438                 DELAY(10);
5439                 if (!(CSR_READ_1(sc, RE_COMMAND) & RE_CMD_RESET))
5440                         break;
5441         }
5442
5443         if (i == RE_TIMEOUT)
5444                 device_printf(sc->dev,"reset never completed!\n");
5445
5446         return;
5447 }
5448
5449 static u_int8_t re_link_ok(struct re_softc *sc)
5450 {
5451         u_int8_t        retval;
5452
5453         retval = (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_LINK_STS) ? 1 : 0;
5454
5455         return retval;
5456 }
5457
5458 #ifndef __DragonFly__
5459 static void
5460 re_set_wol_linkspeed(struct re_softc *sc)
5461 {
5462         u_int8_t wol_link_speed;
5463         u_int16_t anar;
5464
5465         MP_WritePhyUshort(sc, 0x1F, 0x0000);
5466
5467         wol_link_speed = RE_WOL_LINK_SPEED_100M_FIRST;
5468         if (!re_check_dash(sc)) {
5469                 if (re_link_ok(sc)) {
5470                         u_int16_t anlpar;
5471
5472                         anlpar = MP_ReadPhyUshort(sc,MII_ANLPAR);
5473                         if ((anlpar & ANLPAR_10_FD) || (anlpar & ANLPAR_10)) {
5474                                 wol_link_speed = RE_WOL_LINK_SPEED_10M_FIRST;
5475                         } else {
5476                                 wol_link_speed = RE_WOL_LINK_SPEED_100M_FIRST;
5477                         }
5478                 }
5479         }
5480
5481         anar = MP_ReadPhyUshort(sc,MII_ANAR);
5482
5483         if (wol_link_speed == RE_WOL_LINK_SPEED_10M_FIRST)
5484                 anar &= ~(ANAR_TX_FD | ANAR_TX);
5485
5486         if (sc->re_device_id==RT_DEVICEID_8169 || sc->re_device_id==RT_DEVICEID_8169SC ||
5487             sc->re_device_id==RT_DEVICEID_8168 || sc->re_device_id==RT_DEVICEID_8161) {
5488                 u_int16_t gbcr;
5489
5490                 gbcr = MP_ReadPhyUshort(sc,MII_100T2CR);
5491                 gbcr &= ~(GTCR_ADV_1000TFDX|GTCR_ADV_1000THDX);
5492                 MP_WritePhyUshort(sc, MII_100T2CR, gbcr);
5493                 MP_WritePhyUshort(sc, MII_ANAR, anar);
5494                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
5495         } else if (sc->re_type == MACFG_36) {
5496                 MP_WritePhyUshort(sc, MII_ANAR, anar);
5497                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
5498         } else {
5499                 MP_WritePhyUshort(sc, MII_ANAR, anar);
5500                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
5501         }
5502 }
5503
5504 static void
5505 re_setwol(struct re_softc *sc)
5506 {
5507         struct ifnet            *ifp;
5508         int                     pmc;
5509         uint16_t                pmstat;
5510         uint8_t                 v;
5511
5512         RE_LOCK_ASSERT(sc);
5513
5514         ifp = RE_GET_IFNET(sc);
5515
5516         if ((ifp->if_capenable & IFCAP_WOL) == 0) {
5517                 re_phy_power_down(sc->dev);
5518                 return;
5519         }
5520
5521         if (pci_find_cap(sc->dev, PCIY_PMG, &pmc) != 0)
5522                 return;
5523
5524         /* Enable config register write. */
5525         CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_WRITECFG);
5526
5527         /* Enable PME. */
5528         if (sc->re_device_id==RT_DEVICEID_8169 || sc->re_device_id==RT_DEVICEID_8169SC) {
5529                 v = CSR_READ_1(sc, RE_CFG1);
5530                 v &= ~RE_CFG1_PME;
5531                 if ((ifp->if_capenable & IFCAP_WOL) != 0)
5532                         v |= RE_CFG1_PME;
5533                 CSR_WRITE_1(sc, RE_CFG1, v);
5534         }
5535
5536         if (sc->re_if_flags & RL_FLAG_MAGIC_PACKET_V2) {
5537                 uint32_t                Data32;
5538
5539                 Data32 = re_eri_read(sc, 0xDC, 4, ERIAR_ExGMAC);
5540                 Data32 &= ~(BIT_16);
5541                 if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0)
5542                         Data32 |= BIT_16;
5543                 re_eri_write(sc, 0xDC, 4, Data32, ERIAR_ExGMAC);
5544         } else {
5545                 v = CSR_READ_1(sc, RE_CFG3);
5546                 v &= ~(RL_CFG3_WOL_MAGIC);
5547                 if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0)
5548                         v |= RL_CFG3_WOL_MAGIC;
5549                 CSR_WRITE_1(sc, RE_CFG3, v);
5550         }
5551
5552         v = CSR_READ_1(sc, RE_CFG5);
5553         v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST |
5554                RL_CFG5_WOL_LANWAKE);
5555
5556         if ((ifp->if_capenable & IFCAP_WOL_UCAST) != 0)
5557                 v |= RL_CFG5_WOL_UCAST;
5558         if ((ifp->if_capenable & IFCAP_WOL_MCAST) != 0)
5559                 v |= RL_CFG5_WOL_MCAST | RL_CFG5_WOL_BCAST;
5560         if ((ifp->if_capenable & IFCAP_WOL) != 0)
5561                 v |= RL_CFG5_WOL_LANWAKE;
5562         CSR_WRITE_1(sc, RE_CFG5, v);
5563
5564         /* Config register write done. */
5565         CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_OFF);
5566
5567         /*
5568          * It seems that hardware resets its link speed to 100Mbps in
5569          * power down mode so switching to 100Mbps in driver is not
5570          * needed.
5571          */
5572
5573         /* Request PME if WOL is requested. */
5574         pmstat = pci_read_config(sc->dev, pmc + PCIR_POWER_STATUS, 2);
5575         pmstat &= ~(PCIM_PSTAT_PMEENABLE);
5576         if ((ifp->if_capenable & IFCAP_WOL) != 0)
5577                 pmstat |= PCIM_PSTAT_PMEENABLE;
5578         pci_write_config(sc->dev, pmc + PCIR_POWER_STATUS, pmstat, 2);
5579
5580         /* Put controller into sleep mode. */
5581         if ((ifp->if_capenable & IFCAP_WOL) != 0) {
5582                 re_set_rx_packet_filter_in_sleep_state(sc);
5583                 re_set_wol_linkspeed(sc);
5584                 if (sc->re_type == MACFG_21 || sc->re_type == MACFG_22)
5585                         CSR_WRITE_1(sc, RE_COMMAND, RE_CMD_RX_ENB);
5586         }
5587 }
5588 #endif  /* !__DragonFly__ */
5589
5590 static void
5591 re_clrwol(struct re_softc *sc)
5592 {
5593         int                     pmc;
5594         uint16_t                pmstat;
5595         uint8_t                 v;
5596
5597         RE_LOCK_ASSERT(sc);
5598
5599 #ifndef __DragonFly__
5600         if (pci_find_cap(sc->dev, PCIY_PMG, &pmc) != 0)
5601                 return;
5602 #else
5603         if (pci_find_extcap(sc->dev, PCIY_PMG, &pmc) != 0)
5604                 return;
5605 #endif
5606
5607         /* Disable PME and clear PME status. */
5608         pmstat = pci_read_config(sc->dev, pmc + PCIR_POWER_STATUS, 2);
5609         pmstat &= ~PCIM_PSTAT_PMEENABLE;
5610         pci_write_config(sc->dev, pmc + PCIR_POWER_STATUS, pmstat, 2);
5611
5612         /* Enable config register write. */
5613         CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_WRITECFG);
5614
5615         if (sc->re_device_id==RT_DEVICEID_8169 || sc->re_device_id==RT_DEVICEID_8169SC) {
5616                 v = CSR_READ_1(sc, RE_CFG1);
5617                 v &= ~RE_CFG1_PME;
5618                 CSR_WRITE_1(sc, RE_CFG1, v);
5619         }
5620
5621         v = CSR_READ_1(sc, RE_CFG3);
5622         v &= ~(RL_CFG3_WOL_LINK);
5623         CSR_WRITE_1(sc, RE_CFG3, v);
5624
5625         if (sc->re_if_flags & RL_FLAG_MAGIC_PACKET_V2) {
5626                 uint32_t                Data32;
5627
5628                 Data32 = re_eri_read(sc, 0xDC, 4, ERIAR_ExGMAC);
5629                 Data32 &= ~(BIT_16);
5630                 re_eri_write(sc, 0xDC, 4, Data32, ERIAR_ExGMAC);
5631         } else {
5632                 v = CSR_READ_1(sc, RE_CFG3);
5633                 v &= ~(RL_CFG3_WOL_MAGIC);
5634                 CSR_WRITE_1(sc, RE_CFG3, v);
5635         }
5636
5637         v = CSR_READ_1(sc, RE_CFG5);
5638         v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST);
5639         v &= ~RL_CFG5_WOL_LANWAKE;
5640         CSR_WRITE_1(sc, RE_CFG5, v);
5641
5642         /* Config register write done. */
5643         CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_OFF);
5644 }
5645
5646 /*
5647  * Stop the adapter and free any mbufs allocated to the
5648  * RX and TX lists.
5649  */
5650 #ifndef __DragonFly__
5651 static void re_stop(struct re_softc *sc)        /* Stop Driver */
5652 #else   /* __DragonFly__ */
5653 static void
5654 re_stop_rtl(struct re_softc *sc)
5655 #endif  /* !__DragonFly__ */
5656 {
5657 #ifndef __DragonFly__
5658         struct ifnet            *ifp;
5659
5660         /*      RE_LOCK_ASSERT(sc);*/
5661
5662         ifp = RE_GET_IFNET(sc);
5663 #if OS_VER < VERSION(9,0)
5664         ifp->if_timer = 0;
5665 #endif
5666
5667         re_stop_timer(sc);
5668 #endif  /* !__DragonFly__ */
5669
5670         /*
5671          * Disable accepting frames to put RX MAC into idle state.
5672          * Otherwise it's possible to get frames while stop command
5673          * execution is in progress and controller can DMA the frame
5674          * to already freed RX buffer during that period.
5675          */
5676         CSR_WRITE_4(sc, RE_RXCFG, CSR_READ_4(sc, RE_RXCFG) &
5677                     ~(RE_RXCFG_RX_ALLPHYS | RE_RXCFG_RX_INDIV | RE_RXCFG_RX_MULTI |
5678                       RE_RXCFG_RX_BROAD | RE_RXCFG_RX_RUNT | RE_RXCFG_RX_ERRPKT));
5679
5680         CSR_WRITE_2(sc, RE_IMR, 0x0000);
5681         CSR_WRITE_2(sc, RE_ISR, 0xffff);
5682         if (sc->re_type == MACFG_50 || sc->re_type == MACFG_51 || sc->re_type == MACFG_52) {
5683                 re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
5684                 re_eri_write(sc, 0x1dc, 4, 0x0000002d, ERIAR_ExGMAC);
5685         } else if (sc->re_type == MACFG_38) {
5686                 re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
5687                 re_eri_write(sc, 0x1dc, 4, 0x0000003f, ERIAR_ExGMAC);
5688         }
5689         re_reset(sc);
5690
5691 #ifndef __DragonFly__
5692         /*
5693          * Free the TX list buffers.
5694          */
5695         while (sc->re_desc.tx_last_index!=sc->re_desc.tx_cur_index) {
5696                 if (sc->re_desc.re_tx_mtag) {
5697                         bus_dmamap_sync(sc->re_desc.re_tx_mtag,
5698                                         sc->re_desc.re_tx_dmamap[sc->re_desc.tx_last_index],
5699                                         BUS_DMASYNC_POSTWRITE);
5700                         bus_dmamap_unload(sc->re_desc.re_tx_mtag,
5701                                           sc->re_desc.re_tx_dmamap[sc->re_desc.tx_last_index]);
5702                 }
5703
5704                 if (sc->re_desc.tx_buf[sc->re_desc.tx_last_index]!=NULL) {
5705                         m_freem(sc->re_desc.tx_buf[sc->re_desc.tx_last_index]);
5706                         sc->re_desc.tx_buf[sc->re_desc.tx_last_index] = NULL;
5707                 }
5708                 sc->re_desc.tx_last_index = (sc->re_desc.tx_last_index+1)%RE_TX_BUF_NUM;
5709         }
5710
5711         ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
5712
5713         return;
5714 #endif  /* !__DragonFly__ */
5715 }
5716
5717 #ifndef __DragonFly__
5718 /*
5719  * Main transmit routine.
5720  */
5721 static void re_start(struct ifnet *ifp)         /* Transmit Packet*/
5722 {
5723         struct re_softc         *sc;
5724         struct mbuf             *m_head = NULL;
5725
5726         sc = ifp->if_softc;     /* Paste to ifp in function re_attach(dev) */
5727
5728         RE_LOCK(sc);
5729
5730         /*      RE_LOCK_ASSERT(sc);*/
5731
5732         if ((sc->driver_detach == 1) || (sc->rx_fifo_overflow != 0)) {
5733                 RE_UNLOCK(sc);
5734                 return;
5735         }
5736
5737         while (1) {
5738                 int fs = 1, ls = 0, TxLen = 0, PktLen;
5739                 struct mbuf *ptr;
5740                 uint32_t  opts1 =0;
5741                 uint32_t  opts2 =0;
5742                 IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);  /* Remove(get) data from system transmit queue */
5743                 if (m_head == NULL) {
5744                         break;
5745                 }
5746
5747                 if (sc->re_coalesce_tx_pkt) {
5748                         if (re_encap(sc, m_head)) {
5749                                 IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
5750                                 ifp->if_drv_flags |= IFF_DRV_OACTIVE;
5751                                 break;
5752                         }
5753
5754                         m_head = sc->re_desc.tx_buf[sc->re_desc.tx_cur_index];
5755                 }
5756
5757                 if (CountMbufNum(m_head) > CountFreeTxDescNum(sc->re_desc)) {   /* No enough descriptor */
5758                         IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
5759                         ifp->if_drv_flags |= IFF_DRV_OACTIVE;
5760                         break;
5761                 }
5762
5763                 if (ifp->if_bpf) {              /* If there's a BPF listener, bounce a copy of this frame to him. */
5764                         //printf("If there's a BPF listener, bounce a copy of this frame to him. \n");
5765
5766                         /*#if OS_VER < VERSION(5, 1)*/
5767 #if OS_VER < VERSION(4,9)
5768                         bpf_mtap(ifp, m_head);
5769 #else
5770                         bpf_mtap(ifp->if_bpf, m_head);
5771 #endif
5772                 }
5773
5774                 //hw checksum
5775                 if (ifp->if_capenable & IFCAP_TXCSUM) {
5776                         if ((m_head->m_pkthdr.csum_flags & RE_CSUM_FEATURES) !=0)       {
5777                                 if (!(sc->re_if_flags & RL_FLAG_DESCV2)) {
5778                                         opts1 |= RL_IPV4CS1;
5779                                         if ((m_head->m_pkthdr.csum_flags & CSUM_TCP)!=0)
5780                                                 opts1 |=RL_TCPCS1;
5781                                         if ((m_head->m_pkthdr.csum_flags & CSUM_UDP)!=0)
5782                                                 opts1 |=RL_UDPCS1;
5783                                 } else {
5784                                         opts2 |=  RL_IPV4CS;
5785                                         if ((m_head->m_pkthdr.csum_flags & CSUM_TCP)!=0)
5786                                                 opts2 |= RL_TCPCS;
5787                                         else if ((m_head->m_pkthdr.csum_flags & CSUM_UDP)!=0)
5788                                                 opts2 |= RL_UDPCS;
5789                                 }
5790                         }
5791                 }
5792
5793                 //vlan
5794                 if (m_head->m_flags & M_VLANTAG)
5795                         opts2 |= bswap16(m_head->m_pkthdr.ether_vtag) | RL_TDESC_VLANCTL_TAG ;
5796                 ptr = m_head;
5797                 PktLen = ptr->m_pkthdr.len;
5798 #ifdef _DEBUG_
5799                 printf("PktLen=%d",PktLen);
5800 #endif
5801                 while (ptr!=NULL) {
5802                         if (ptr->m_len >0) {
5803 #ifdef _DEBUG_
5804                                 printf(", len=%d T=%d F=%d",ptr->m_len,ptr->m_type,ptr->m_flags);
5805 #endif
5806                                 TxLen += ptr->m_len;
5807                                 if (TxLen >= PktLen) {
5808                                         ls=1;
5809                                         sc->re_desc.tx_buf[sc->re_desc.tx_cur_index] = m_head;
5810                                 } else
5811                                         sc->re_desc.tx_buf[sc->re_desc.tx_cur_index] = NULL;
5812
5813                                 //vlan
5814                                 WritePacket(sc,ptr->m_data,ptr->m_len,fs,ls,opts2,opts1);
5815
5816                                 fs=0;
5817                         }
5818                         ptr = ptr->m_next;
5819                 }
5820 #ifdef _DEBUG_
5821                 printf("\n");
5822 #endif
5823         }
5824 #if OS_VER < VERSION(9,0)
5825         ifp->if_timer = 5;
5826 #endif
5827
5828         RE_UNLOCK(sc);
5829
5830         return;
5831 }
5832
5833 /*
5834  * Encapsulate an mbuf chain in a descriptor by coupling the mbuf data
5835  * pointers to the fragment pointers.
5836  */
5837 static int re_encap(struct re_softc *sc,struct mbuf *m_head)
5838 {
5839         struct mbuf             *m_new = NULL;
5840
5841         m_new = m_defrag(m_head, M_DONTWAIT);
5842
5843         if (m_new == NULL) {
5844                 printf("re%d: no memory for tx list", sc->re_unit);
5845                 return (1);
5846         }
5847         m_head = m_new;
5848
5849         /* Pad frames to at least 60 bytes. */
5850         if (m_head->m_pkthdr.len < RE_MIN_FRAMELEN) {   /* Case length < 60 bytes */
5851                 /*
5852                  * Make security concious people happy: zero out the
5853                  * bytes in the pad area, since we don't know what
5854                  * this mbuf cluster buffer's previous user might
5855                  * have left in it.
5856                  */
5857                 bzero(mtod(m_head, char *) + m_head->m_pkthdr.len,
5858                       RE_MIN_FRAMELEN - m_head->m_pkthdr.len);
5859                 m_head->m_pkthdr.len = RE_MIN_FRAMELEN;
5860                 m_head->m_len = m_head->m_pkthdr.len;
5861         }
5862
5863         sc->re_desc.tx_buf[sc->re_desc.tx_cur_index] = m_head;
5864
5865         return(0);
5866 }
5867
5868 static void WritePacket(struct re_softc *sc, caddr_t addr, int len,int fs_flag,int ls_flag, uint32_t opts2,uint32_t opts1)
5869 {
5870         union TxDesc *txptr;
5871
5872         txptr=&(sc->re_desc.tx_desc[sc->re_desc.tx_cur_index]);
5873
5874         txptr->ul[0] &= htole32(0x40000000);
5875         txptr->ul[0] |= htole32(opts1);
5876         txptr->ul[1] = htole32(opts2);
5877
5878         if (fs_flag)
5879                 txptr->ul[0] |= htole32(RL_TDESC_CMD_SOF);
5880         if (ls_flag)
5881                 txptr->ul[0] |= htole32(RL_TDESC_CMD_EOF);
5882         txptr->ul[0] |= htole32(len);
5883         bus_dmamap_load(sc->re_desc.re_tx_mtag,
5884                         sc->re_desc.re_tx_dmamap[sc->re_desc.tx_cur_index],
5885                         addr,
5886                         len,
5887                         re_tx_dma_map_buf, txptr,
5888                         0);
5889         bus_dmamap_sync(sc->re_desc.re_tx_mtag,
5890                         sc->re_desc.re_tx_dmamap[sc->re_desc.tx_cur_index],
5891                         BUS_DMASYNC_PREWRITE);
5892         txptr->ul[0] |= htole32(RL_TDESC_CMD_OWN);
5893
5894         bus_dmamap_sync(sc->re_desc.tx_desc_tag,
5895                         sc->re_desc.tx_desc_dmamap,
5896                         BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
5897
5898         if (ls_flag) {
5899                 CSR_WRITE_1(sc, RE_TPPOLL, RE_NPQ);
5900                 CSR_WRITE_1(sc, RE_TPPOLL, RE_NPQ);
5901         }
5902
5903         sc->re_desc.tx_cur_index = (sc->re_desc.tx_cur_index+1)%RE_TX_BUF_NUM;
5904 }
5905
5906 static int CountFreeTxDescNum(struct re_descriptor desc)
5907 {
5908         int ret=desc.tx_last_index-desc.tx_cur_index;
5909         if (ret<=0)
5910                 ret+=RE_TX_BUF_NUM;
5911         ret--;
5912         return ret;
5913 }
5914
5915 static int CountMbufNum(struct mbuf *m_head)
5916 {
5917         int ret=0;
5918         struct mbuf *ptr = m_head;
5919
5920         while (ptr!=NULL) {
5921                 if (ptr->m_len >0)
5922                         ret++;
5923                 ptr=ptr->m_next;
5924         }
5925
5926         return ret;
5927 }
5928
5929 #ifdef RE_FIXUP_RX
5930 static __inline void re_fixup_rx(struct mbuf *m)
5931 {
5932         int                     i;
5933         uint16_t                *src, *dst;
5934
5935         src = mtod(m, uint16_t *);
5936         dst = src - (RE_ETHER_ALIGN - ETHER_ALIGN) / sizeof *src;
5937
5938         for (i = 0; i < (m->m_len / sizeof(uint16_t) + 1); i++)
5939                 *dst++ = *src++;
5940
5941         m->m_data -= RE_ETHER_ALIGN - ETHER_ALIGN;
5942 }
5943 #endif
5944
5945 /*
5946  * A frame was downloaded to the chip. It's safe for us to clean up
5947  * the list buffers.
5948  */
5949 static void re_txeof(struct re_softc *sc)       /* Transmit OK/ERR handler */
5950 {
5951         union TxDesc *txptr;
5952         struct ifnet            *ifp;
5953         u_int32_t           txstat;
5954
5955         /*      printf("X");*/
5956
5957         ifp = RE_GET_IFNET(sc);
5958
5959 #if OS_VER < VERSION(9,0)
5960         /* Clear the timeout timer. */
5961         ifp->if_timer = 0;
5962 #endif
5963
5964         bus_dmamap_sync(sc->re_desc.tx_desc_tag,
5965                         sc->re_desc.tx_desc_dmamap,
5966                         BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
5967
5968         while (sc->re_desc.tx_last_index!=sc->re_desc.tx_cur_index) {
5969                 txptr=&(sc->re_desc.tx_desc[sc->re_desc.tx_last_index]);
5970                 txstat = le32toh(txptr->ul[0]);
5971                 if (txstat & RL_TDESC_STAT_OWN)
5972                         break;
5973 #ifdef _DEBUG_
5974                 printf("**** Tx OK  ****\n");
5975 #endif
5976                 bus_dmamap_sync(sc->re_desc.re_tx_mtag,
5977                                 sc->re_desc.re_tx_dmamap[sc->re_desc.tx_last_index],
5978                                 BUS_DMASYNC_POSTWRITE);
5979                 bus_dmamap_unload(sc->re_desc.re_tx_mtag,
5980                                   sc->re_desc.re_tx_dmamap[sc->re_desc.tx_last_index]);
5981
5982                 if (sc->re_desc.tx_buf[sc->re_desc.tx_last_index]!=NULL) {
5983                         m_freem(sc->re_desc.tx_buf[sc->re_desc.tx_last_index]); /* Free Current MBuf in a Mbuf list*/
5984                         sc->re_desc.tx_buf[sc->re_desc.tx_last_index] = NULL;
5985                 }
5986
5987                 sc->re_desc.tx_last_index = (sc->re_desc.tx_last_index+1)%RE_TX_BUF_NUM;
5988 #if OS_VER < VERSION(11,0)
5989                 if (txstat & (RL_TDESC_STAT_EXCESSCOL|
5990                               RL_TDESC_STAT_COLCNT))
5991                         ifp->if_collisions++;
5992                 if (txstat & RL_TDESC_STAT_TXERRSUM)
5993                         ifp->if_oerrors++;
5994                 else
5995                         ifp->if_opackets++;
5996 #else
5997                 if (txstat & (RL_TDESC_STAT_EXCESSCOL|
5998                               RL_TDESC_STAT_COLCNT))
5999                         if_inc_counter(ifp, IFCOUNTER_COLLISIONS, 1);
6000                 if (txstat & RL_TDESC_STAT_TXERRSUM)
6001                         if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
6002                 else
6003                         if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
6004 #endif
6005                 ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
6006         }
6007
6008         return;
6009 }
6010
6011 /*
6012  * A frame has been uploaded: pass the resulting mbuf chain up to
6013  * the higher level protocols.
6014  *
6015  * You know there's something wrong with a PCI bus-master chip design
6016  * when you have to use m_devget().
6017  *
6018  * The receive operation is badly documented in the datasheet, so I'll
6019  * attempt to document it here. The driver provides a buffer area and
6020  * places its base address in the RX buffer start address register.
6021  * The chip then begins copying frames into the RX buffer. Each frame
6022  * is preceeded by a 32-bit RX status word which specifies the length
6023  * of the frame and certain other status bits. Each frame (starting with
6024  * the status word) is also 32-bit aligned. The frame length is in the
6025  * first 16 bits of the status word; the lower 15 bits correspond with
6026  * the 'rx status register' mentioned in the datasheet.
6027  *
6028  * Note: to make the Alpha happy, the frame payload needs to be aligned
6029  * on a 32-bit boundary. To achieve this, we cheat a bit by copying from
6030  * the ring buffer starting at an address two bytes before the actual
6031  * data location. We can then shave off the first two bytes using m_adj().
6032  * The reason we do this is because m_devget() doesn't let us specify an
6033  * offset into the mbuf storage space, so we have to artificially create
6034  * one. The ring is allocated in such a way that there are a few unused
6035  * bytes of space preceecing it so that it will be safe for us to do the
6036  * 2-byte backstep even if reading from the ring at offset 0.
6037  */
6038 static void re_rxeof(sc)        /* Receive Data OK/ERR handler */
6039 struct re_softc         *sc;
6040 {
6041         struct ether_header     *eh;
6042         struct mbuf             *m;
6043         struct ifnet            *ifp;
6044         union RxDesc *rxptr;
6045         int bError;
6046         struct mbuf *buf;
6047         int size;
6048         int maxpkt = RE_RX_BUF_NUM;
6049
6050         u_int32_t opts2,opts1;
6051
6052         /*              RE_LOCK_ASSERT(sc);*/
6053
6054         ifp = RE_GET_IFNET(sc);
6055
6056         bus_dmamap_sync(sc->re_desc.rx_desc_tag,
6057                         sc->re_desc.rx_desc_dmamap,
6058                         BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE);
6059
6060         rxptr=&(sc->re_desc.rx_desc[sc->re_desc.rx_cur_index]);
6061         while ((rxptr->ul[0]&htole32(RL_RDESC_STAT_OWN))==0) {  /* Receive OK */
6062                 bError = 0;
6063
6064                 opts1 = le32toh(rxptr->ul[0]);
6065
6066                 /* Check if this packet is received correctly*/
6067                 if (opts1&0x200000) {   /*Check RES bit*/
6068                         bError=1;
6069 #if OS_VER < VERSION(11,0)
6070                         ifp->if_ierrors++;
6071 #else
6072                         if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
6073 #endif
6074                         goto update_desc;
6075                 }
6076                 opts2 = le32toh(rxptr->ul[1]);
6077
6078                 //buf = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); /* Alloc a new mbuf */
6079
6080                 if (sc->re_rx_mbuf_sz <= MCLBYTES)
6081                         size = MCLBYTES;
6082                 else if (sc->re_rx_mbuf_sz <= MJUMPAGESIZE)
6083                         size = MJUMPAGESIZE;
6084                 else
6085                         size = MJUM9BYTES;
6086
6087                 buf = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, size);
6088                 if (buf==NULL) {
6089                         bError=1;
6090 #if OS_VER < VERSION(11,0)
6091                         ifp->if_iqdrops++;
6092 #else
6093                         if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1);
6094 #endif
6095                         goto update_desc;
6096                 }
6097
6098                 buf->m_len = buf->m_pkthdr.len = size;
6099 #ifdef RE_FIXUP_RX
6100                 /*
6101                  * This is part of an evil trick to deal with non-x86 platforms.
6102                  * The RealTek chip requires RX buffers to be aligned on 64-bit
6103                  * boundaries, but that will hose non-x86 machines. To get around
6104                  * this, we leave some empty space at the start of each buffer
6105                  * and for non-x86 hosts, we copy the buffer back six bytes
6106                  * to achieve word alignment. This is slightly more efficient
6107                  * than allocating a new buffer, copying the contents, and
6108                  * discarding the old buffer.
6109                  */
6110                 m_adj(buf, RE_ETHER_ALIGN);
6111 #endif
6112
6113                 bus_dmamap_sync(sc->re_desc.re_rx_mtag,
6114                                 sc->re_desc.re_rx_dmamap[sc->re_desc.rx_cur_index],
6115                                 BUS_DMASYNC_POSTREAD);
6116                 bus_dmamap_unload(sc->re_desc.re_rx_mtag,
6117                                   sc->re_desc.re_rx_dmamap[sc->re_desc.rx_cur_index]);
6118
6119                 m = sc->re_desc.rx_buf[sc->re_desc.rx_cur_index];
6120                 sc->re_desc.rx_buf[sc->re_desc.rx_cur_index] = buf;
6121                 m->m_pkthdr.len = m->m_len = (opts1&RL_RDESC_STAT_GFRAGLEN)-ETHER_CRC_LEN;
6122                 m->m_pkthdr.rcvif = ifp;
6123
6124 #ifdef RE_FIXUP_RX
6125                 re_fixup_rx(m);
6126 #endif
6127
6128                 //vlan
6129                 if (opts2 & RL_RDESC_VLANCTL_TAG) {
6130                         m->m_pkthdr.ether_vtag =
6131                                 bswap16((opts2 & RL_RDESC_VLANCTL_DATA));
6132                         m->m_flags |= M_VLANTAG;
6133                 }
6134                 if (ifp->if_capenable & IFCAP_RXCSUM) {
6135                         if (!(sc->re_if_flags & RL_FLAG_DESCV2)) {
6136                                 if (opts1 & RL_ProtoIP)
6137                                         m->m_pkthdr.csum_flags |=  CSUM_IP_CHECKED;
6138                                 if (!(opts1 & RL_IPF))
6139                                         m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
6140                                 if ((((opts1 & RL_ProtoIP)==(1<<17)) && !(opts1 & RL_TCPF))   || (((opts1 & RL_ProtoIP)==(1<<18)) && !(opts1 & RL_UDPF))) {
6141                                         m->m_pkthdr.csum_flags |= CSUM_DATA_VALID|CSUM_PSEUDO_HDR;
6142                                         m->m_pkthdr.csum_data = 0xffff;
6143                                 }
6144                         } else {
6145                                 if ((opts1 & RL_ProtoIP) && (opts2 & RL_V4F))
6146                                         m->m_pkthdr.csum_flags |=  CSUM_IP_CHECKED;
6147                                 if (!(opts1 & RL_IPF) && (opts2 & RL_V4F))
6148                                         m->m_pkthdr.csum_flags |= CSUM_IP_VALID;
6149                                 if (((opts1 & RL_TCPT) && !(opts2 & RL_TCPF)) || ((opts1 & RL_UDPT) && !(opts2 & RL_UDPF))) {
6150                                         m->m_pkthdr.csum_flags |= CSUM_DATA_VALID|CSUM_PSEUDO_HDR;
6151                                         m->m_pkthdr.csum_data = 0xffff;
6152                                 }
6153                         }
6154                 }
6155
6156                 eh = mtod(m, struct ether_header *);
6157 #if OS_VER < VERSION(11,0)
6158                 ifp->if_ipackets++;
6159 #else
6160                 if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
6161 #endif
6162 #ifdef _DEBUG_
6163                 printf("Rcv Packet, Len=%d \n", m->m_len);
6164 #endif
6165
6166                 RE_UNLOCK(sc);
6167
6168                 /*#if OS_VER < VERSION(5, 1)*/
6169 #if OS_VER < VERSION(4,9)
6170                 /* Remove header from mbuf and pass it on. */
6171                 m_adj(m, sizeof(struct ether_header));
6172                 ether_input(ifp, eh, m);
6173 #else
6174                 (*ifp->if_input)(ifp, m);
6175 #endif
6176                 RE_LOCK(sc);
6177
6178 update_desc:
6179                 rxptr->ul[0]&=htole32(0x40000000);      /* keep EOR bit */
6180                 rxptr->ul[1]=0;
6181
6182                 rxptr->ul[0] |= htole32(sc->re_rx_desc_buf_sz);
6183                 if (!bError) {
6184                         bus_dmamap_load(sc->re_desc.re_rx_mtag,
6185                                         sc->re_desc.re_rx_dmamap[sc->re_desc.rx_cur_index],
6186                                         sc->re_desc.rx_buf[sc->re_desc.rx_cur_index]->m_data,
6187                                         sc->re_rx_desc_buf_sz,
6188                                         re_rx_dma_map_buf, rxptr,
6189                                         0);
6190                         bus_dmamap_sync(sc->re_desc.re_rx_mtag,
6191                                         sc->re_desc.re_rx_dmamap[sc->re_desc.rx_cur_index],
6192                                         BUS_DMASYNC_PREREAD);
6193                 }
6194                 rxptr->ul[0] |= htole32(RL_RDESC_CMD_OWN);
6195                 sc->re_desc.rx_cur_index = (sc->re_desc.rx_cur_index+1)%RE_RX_BUF_NUM;
6196                 rxptr=&sc->re_desc.rx_desc[sc->re_desc.rx_cur_index];
6197
6198                 maxpkt--;
6199                 if (maxpkt==0)
6200                         break;
6201         }
6202
6203         bus_dmamap_sync(sc->re_desc.rx_desc_tag,
6204                         sc->re_desc.rx_desc_dmamap,
6205                         BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
6206
6207         return;
6208 }
6209
6210 #if OS_VER < VERSION(7,0)
6211 static void re_intr(void *arg)          /* Interrupt Handler */
6212 #else
6213 static int re_intr(void *arg)   /* Interrupt Handler */
6214 #endif //OS_VER < VERSION(7,0)
6215 {
6216         struct re_softc         *sc;
6217
6218         sc = arg;
6219
6220         if ((sc->re_if_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) {
6221                 if ((CSR_READ_2(sc, RE_ISR) & RE_INTRS) == 0) {
6222 #if OS_VER < VERSION(7,0)
6223                         return;
6224 #else
6225                         return (FILTER_STRAY);
6226 #endif
6227                 }
6228         }
6229
6230         /* Disable interrupts. */
6231         CSR_WRITE_2(sc, RE_IMR, 0x0000);
6232
6233 #if OS_VER < VERSION(7,0)
6234         re_int_task(arg, 0);
6235 #else //OS_VER < VERSION(7,0)
6236 #if OS_VER < VERSION(11,0)
6237         taskqueue_enqueue_fast(taskqueue_fast, &sc->re_inttask);
6238 #else ////OS_VER < VERSION(11,0)
6239         taskqueue_enqueue(taskqueue_fast, &sc->re_inttask);
6240 #endif //OS_VER < VERSION(11,0)
6241         return (FILTER_HANDLED);
6242 #endif //OS_VER < VERSION(7,0)
6243 }
6244
6245 static void re_int_task(void *arg, int npending)
6246 {
6247         struct re_softc         *sc;
6248         struct ifnet            *ifp;
6249         u_int16_t               status;
6250
6251         sc = arg;
6252
6253         RE_LOCK(sc);
6254
6255         ifp = RE_GET_IFNET(sc);
6256
6257         status = CSR_READ_2(sc, RE_ISR);
6258
6259         if (status) {
6260                 CSR_WRITE_2(sc, RE_ISR, status & 0xffbf);
6261         }
6262
6263         if (sc->suspended ||
6264             (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
6265                 RE_UNLOCK(sc);
6266                 return;
6267         }
6268
6269         re_rxeof(sc);
6270
6271         if (sc->re_type == MACFG_21) {
6272                 if (status & RE_ISR_FIFO_OFLOW) {
6273                         sc->rx_fifo_overflow = 1;
6274                         CSR_WRITE_2(sc, 0x00e2, 0x0000);
6275                         CSR_WRITE_4(sc, 0x0048, 0x4000);
6276                         CSR_WRITE_4(sc, 0x0058, 0x4000);
6277                 } else {
6278                         sc->rx_fifo_overflow = 0;
6279                         CSR_WRITE_4(sc,RE_CPCR, 0x51512082);
6280                 }
6281
6282                 if (status & RE_ISR_PCS_TIMEOUT) {
6283                         if ((status & RE_ISR_FIFO_OFLOW) &&
6284                             (!(status & (RE_ISR_RX_OK | RE_ISR_TX_OK | RE_ISR_RX_OVERRUN)))) {
6285                                 re_reset(sc);
6286                                 re_init(sc);
6287                                 sc->rx_fifo_overflow = 0;
6288                                 CSR_WRITE_2(sc, RE_ISR, RE_ISR_FIFO_OFLOW);
6289                         }
6290                 }
6291         }
6292
6293         re_txeof(sc);
6294
6295         if (status & RE_ISR_SYSTEM_ERR) {
6296                 re_reset(sc);
6297                 re_init(sc);
6298         }
6299
6300         switch(sc->re_type) {
6301         case MACFG_21:
6302         case MACFG_22:
6303         case MACFG_23:
6304         case MACFG_24:
6305                 CSR_WRITE_1(sc, RE_TPPOLL, RE_NPQ);
6306                 break;
6307
6308         default:
6309                 break;
6310         }
6311
6312         RE_UNLOCK(sc);
6313
6314         if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
6315                 re_start(ifp);
6316
6317 #if OS_VER>=VERSION(7,0)
6318         if (CSR_READ_2(sc, RE_ISR) & RE_INTRS) {
6319 #if OS_VER < VERSION(11,0)
6320                 taskqueue_enqueue_fast(taskqueue_fast, &sc->re_inttask);
6321 #else ////OS_VER < VERSION(11,0)
6322                 taskqueue_enqueue(taskqueue_fast, &sc->re_inttask);
6323 #endif //OS_VER < VERSION(11,0)
6324                 return;
6325         }
6326 #endif //OS_VER>=VERSION(7,0)
6327
6328         /* Re-enable interrupts. */
6329         CSR_WRITE_2(sc, RE_IMR, RE_INTRS);
6330 }
6331 #endif  /* !__DragonFly__ */
6332
6333 static void re_set_multicast_reg(struct re_softc *sc, u_int32_t mask0, u_int32_t mask4)
6334 {
6335         u_int8_t  enable_cfg_reg_write = 0;
6336
6337         if (sc->re_type == MACFG_5 || sc->re_type == MACFG_6)
6338                 enable_cfg_reg_write = 1;
6339
6340         if (enable_cfg_reg_write)
6341                 CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_WRITECFG);
6342         CSR_WRITE_4(sc, RE_MAR0, mask0);
6343         CSR_WRITE_4(sc, RE_MAR4, mask4);
6344         if (enable_cfg_reg_write)
6345                 CSR_WRITE_1(sc, RE_EECMD, RE_EEMODE_OFF);
6346
6347         return;
6348 }
6349
6350 #ifndef __DragonFly__
6351 static void re_set_rx_packet_filter_in_sleep_state(struct re_softc *sc)
6352 {
6353         struct ifnet            *ifp;
6354         u_int32_t               rxfilt;
6355
6356         ifp = RE_GET_IFNET(sc);
6357
6358         rxfilt = CSR_READ_4(sc, RE_RXCFG);
6359
6360         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);
6361         rxfilt |= (RE_RXCFG_RX_INDIV | RE_RXCFG_RX_MULTI | RE_RXCFG_RX_BROAD);
6362
6363         CSR_WRITE_4(sc, RE_RXCFG, rxfilt);
6364
6365         re_set_multicast_reg(sc, 0xFFFFFFFF, 0xFFFFFFFF);
6366
6367         return;
6368 }
6369 #endif  /* !__DragonFly__ */
6370
6371 static void re_set_rx_packet_filter(struct re_softc *sc)
6372 {
6373         struct ifnet            *ifp;
6374         u_int32_t               rxfilt;
6375
6376         ifp = RE_GET_IFNET(sc);
6377
6378         rxfilt = CSR_READ_4(sc, RE_RXCFG);
6379
6380         rxfilt |= RE_RXCFG_RX_INDIV;
6381
6382         if (ifp->if_flags & (IFF_MULTICAST | IFF_ALLMULTI | IFF_PROMISC)) {
6383                 rxfilt |= (RE_RXCFG_RX_ALLPHYS | RE_RXCFG_RX_MULTI);
6384         } else {
6385                 rxfilt &= ~(RE_RXCFG_RX_MULTI);
6386         }
6387
6388         if (ifp->if_flags & IFF_PROMISC) {
6389                 rxfilt |= (RE_RXCFG_RX_ALLPHYS | RE_RXCFG_RX_RUNT | RE_RXCFG_RX_ERRPKT);
6390         } else {
6391                 rxfilt &= ~(RE_RXCFG_RX_ALLPHYS | RE_RXCFG_RX_RUNT | RE_RXCFG_RX_ERRPKT);
6392         }
6393
6394         if (ifp->if_flags & (IFF_BROADCAST | IFF_PROMISC)) {
6395                 rxfilt |= RE_RXCFG_RX_BROAD;
6396         } else {
6397                 rxfilt &= ~RE_RXCFG_RX_BROAD;
6398         }
6399
6400         CSR_WRITE_4(sc, RE_RXCFG, rxfilt);
6401
6402         re_setmulti(sc);
6403
6404         return;
6405 }
6406
6407 /*
6408  * Program the 64-bit multicast hash filter.
6409  */
6410 static void re_setmulti(struct re_softc *sc)
6411 {
6412         struct ifnet            *ifp;
6413         int                     h = 0;
6414         u_int32_t               hashes[2] = { 0, 0 };
6415         struct ifmultiaddr      *ifma;
6416         u_int32_t               rxfilt;
6417         int                     mcnt = 0;
6418
6419         ifp = RE_GET_IFNET(sc);
6420
6421         rxfilt = CSR_READ_4(sc, RE_RXCFG);
6422
6423         if (ifp->if_flags & IFF_ALLMULTI || ifp->if_flags & IFF_PROMISC) {
6424                 rxfilt |= RE_RXCFG_RX_MULTI;
6425                 CSR_WRITE_4(sc, RE_RXCFG, rxfilt);
6426                 re_set_multicast_reg(sc, 0xFFFFFFFF, 0xFFFFFFFF);
6427
6428                 return;
6429         }
6430
6431 #ifndef __DragonFly__
6432         /* now program new ones */
6433 #if OS_VER > VERSION(6,0)
6434         IF_ADDR_LOCK(ifp);
6435 #endif
6436 #if OS_VER < VERSION(4,9)
6437         for (ifma = ifp->if_multiaddrs.lh_first; ifma != NULL;
6438              ifma = ifma->ifma_link.le_next)
6439 #else
6440         TAILQ_FOREACH(ifma,&ifp->if_multiaddrs,ifma_link)
6441 #endif
6442 #else   /* __DragonFly__ */
6443         TAILQ_FOREACH(ifma,&ifp->if_multiaddrs,ifma_link)
6444 #endif  /* !__DragonFly__ */
6445         {
6446                 if (ifma->ifma_addr->sa_family != AF_LINK)
6447                         continue;
6448                 h = ether_crc32_be(LLADDR((struct sockaddr_dl *)
6449                                           ifma->ifma_addr), ETHER_ADDR_LEN) >> 26;
6450                 if (h < 32)
6451                         hashes[0] |= (1 << h);
6452                 else
6453                         hashes[1] |= (1 << (h - 32));
6454                 mcnt++;
6455         }
6456 #ifndef __DragonFly__
6457 #if OS_VER > VERSION(6,0)
6458         IF_ADDR_UNLOCK(ifp);
6459 #endif
6460 #endif  /* !__DragonFly__ */
6461
6462         if (mcnt) {
6463                 if ((sc->re_if_flags & RL_FLAG_PCIE) != 0) {
6464                         h = bswap32(hashes[0]);
6465                         hashes[0] = bswap32(hashes[1]);
6466                         hashes[1] = h;
6467                 }
6468                 rxfilt |= RE_RXCFG_RX_MULTI;
6469         } else
6470                 rxfilt &= ~RE_RXCFG_RX_MULTI;
6471
6472         CSR_WRITE_4(sc, RE_RXCFG, rxfilt);
6473         re_set_multicast_reg(sc, hashes[0], hashes[1]);
6474
6475         return;
6476 }
6477
6478 #ifndef __DragonFly__
6479 static int re_ioctl(ifp, command, data)
6480 struct ifnet            *ifp;
6481 u_long                  command;
6482 caddr_t                 data;
6483 {
6484         struct re_softc         *sc = ifp->if_softc;
6485         struct ifreq            *ifr = (struct ifreq *) data;
6486         /*int                   s;*/
6487         int                     error = 0;
6488         int mask, reinit;
6489         /*s = splimp();*/
6490
6491         switch(command) {
6492         case SIOCSIFADDR:
6493         case SIOCGIFADDR:
6494                 error = ether_ioctl(ifp, command, data);
6495
6496                 break;
6497         case SIOCSIFMTU:
6498
6499                 //printf("before mtu =%d\n",(int)ifp->if_mtu);
6500                 if (ifr->ifr_mtu > sc->max_jumbo_frame_size)
6501                         error = EINVAL;
6502                 else {
6503                         ifp->if_mtu = ifr->ifr_mtu;
6504
6505                         //if running
6506                         if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
6507                                 //printf("set mtu when running\n");
6508
6509                                 RE_LOCK(sc);
6510                                 re_stop(sc);
6511
6512                                 re_release_buf(sc);
6513                                 set_rxbufsize(sc);
6514                                 error =re_alloc_buf(sc);
6515
6516                                 if (error == 0) {
6517                                         re_init(sc);
6518                                 }
6519                                 RE_UNLOCK(sc);
6520
6521                         } else {
6522                                 //if not running
6523                                 RE_LOCK(sc);
6524                                 re_release_buf(sc);
6525                                 set_rxbufsize(sc);
6526                                 error =re_alloc_buf(sc);
6527                                 if (error == 0) {
6528                                         /* Init descriptors. */
6529                                         re_var_init(sc);
6530                                 }
6531                                 RE_UNLOCK(sc);
6532                         }
6533
6534                 }
6535                 //      printf("after mtu =%d\n",(int)ifp->if_mtu);
6536                 break;
6537         case SIOCSIFFLAGS:
6538                 RE_LOCK(sc);
6539                 if (ifp->if_flags & IFF_UP) {
6540                         re_init(sc);
6541                 } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
6542                         re_stop(sc);
6543                 }
6544                 error = 0;
6545                 RE_UNLOCK(sc);
6546                 break;
6547         case SIOCADDMULTI:
6548         case SIOCDELMULTI:
6549                 RE_LOCK(sc);
6550                 re_set_rx_packet_filter(sc);
6551                 RE_UNLOCK(sc);
6552                 error = 0;
6553                 break;
6554         case SIOCGIFMEDIA:
6555         case SIOCSIFMEDIA:
6556                 error = ifmedia_ioctl(ifp, ifr, &sc->media, command);
6557                 break;
6558         case SIOCSIFCAP:
6559
6560
6561                 mask = ifr->ifr_reqcap ^ ifp->if_capenable;
6562                 reinit = 0;
6563
6564                 if ((mask & IFCAP_TXCSUM) != 0 && (ifp->if_capabilities & IFCAP_TXCSUM) != 0) {
6565                         ifp->if_capenable ^= IFCAP_TXCSUM;
6566                         if ((ifp->if_capenable & IFCAP_TXCSUM) != 0)  {
6567                                 if ((sc->re_type == MACFG_24) || (sc->re_type == MACFG_24) || (sc->re_type == MACFG_26))
6568                                         ifp->if_hwassist |= CSUM_TCP | CSUM_UDP;
6569                                 else
6570                                         ifp->if_hwassist |= RE_CSUM_FEATURES;
6571                         } else
6572                                 ifp->if_hwassist &= ~RE_CSUM_FEATURES;
6573                         reinit = 1;
6574                 }
6575
6576                 if ((mask & IFCAP_RXCSUM) != 0 &&
6577                     (ifp->if_capabilities & IFCAP_RXCSUM) != 0) {
6578                         ifp->if_capenable ^= IFCAP_RXCSUM;
6579                         reinit = 1;
6580                 }
6581
6582                 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))) {
6583                         if (ifp->if_capenable & IFCAP_TXCSUM)
6584                                 sc->re_tx_cstag = 1;
6585                         else
6586                                 sc->re_tx_cstag = 0;
6587
6588                         if (ifp->if_capenable & IFCAP_RXCSUM)
6589                                 sc->re_rx_cstag = 1;
6590                         else
6591                                 sc->re_rx_cstag = 0;
6592                 }
6593                 if ((mask & IFCAP_VLAN_HWTAGGING) != 0 &&
6594                     (ifp->if_capabilities & IFCAP_VLAN_HWTAGGING) != 0) {
6595                         ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING;
6596                         /* TSO over VLAN requires VLAN hardware tagging. */
6597                         //if ((ifp->if_capenable & IFCAP_VLAN_HWTAGGING) == 0)
6598                         //      ifp->if_capenable &= ~IFCAP_VLAN_HWTSO;
6599                         reinit = 1;
6600                 }
6601
6602                 if ((mask & IFCAP_WOL) != 0 &&
6603                     (ifp->if_capabilities & IFCAP_WOL) != 0) {
6604                         if ((mask & IFCAP_WOL_UCAST) != 0)
6605                                 ifp->if_capenable ^= IFCAP_WOL_UCAST;
6606                         if ((mask & IFCAP_WOL_MCAST) != 0)
6607                                 ifp->if_capenable ^= IFCAP_WOL_MCAST;
6608                         if ((mask & IFCAP_WOL_MAGIC) != 0)
6609                                 ifp->if_capenable ^= IFCAP_WOL_MAGIC;
6610                 }
6611                 if (reinit && ifp->if_drv_flags & IFF_DRV_RUNNING) {
6612                         ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
6613                         re_init(sc);
6614                 }
6615                 VLAN_CAPABILITIES(ifp);
6616                 break;
6617         default:
6618                 error = EINVAL;
6619                 break;
6620         }
6621
6622         /*(void)splx(s);*/
6623
6624         return(error);
6625 }
6626 #endif  /* !__DragonFly__ */
6627
6628 static void re_link_on_patch(struct re_softc *sc)
6629 {
6630         struct ifnet            *ifp;
6631
6632         ifp = RE_GET_IFNET(sc);
6633
6634         if (sc->re_type == MACFG_50 || sc->re_type == MACFG_51 || sc->re_type == MACFG_52) {
6635                 if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_1000MF) {
6636                         re_eri_write(sc, 0x1bc, 4, 0x00000011, ERIAR_ExGMAC);
6637                         re_eri_write(sc, 0x1dc, 4, 0x0000001f, ERIAR_ExGMAC);
6638                 } else if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_100M) {
6639                         re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
6640                         re_eri_write(sc, 0x1dc, 4, 0x0000001f, ERIAR_ExGMAC);
6641                 } else {
6642                         re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
6643                         re_eri_write(sc, 0x1dc, 4, 0x0000002d, ERIAR_ExGMAC);
6644                 }
6645         } else if ((sc->re_type == MACFG_38 || sc->re_type == MACFG_39) && (ifp->if_flags & IFF_UP)) {
6646                 if (sc->re_type == MACFG_38 && (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_10M)) {
6647                         CSR_WRITE_4(sc, RE_RXCFG, CSR_READ_4(sc, RE_RXCFG) | RE_RXCFG_RX_ALLPHYS);
6648                 } else if (sc->re_type == MACFG_39) {
6649                         if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_1000MF) {
6650                                 re_eri_write(sc, 0x1bc, 4, 0x00000011, ERIAR_ExGMAC);
6651                                 re_eri_write(sc, 0x1dc, 4, 0x00000005, ERIAR_ExGMAC);
6652                         } else if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_100M) {
6653                                 re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
6654                                 re_eri_write(sc, 0x1dc, 4, 0x00000005, ERIAR_ExGMAC);
6655                         } else {
6656                                 re_eri_write(sc, 0x1bc, 4, 0x0000001f, ERIAR_ExGMAC);
6657                                 re_eri_write(sc, 0x1dc, 4, 0x0000003f, ERIAR_ExGMAC);
6658                         }
6659                 }
6660         } else if ((sc->re_type == MACFG_36 || sc->re_type == MACFG_37) && eee_enable ==1) {
6661                 /*Full -Duplex  mode*/
6662                 if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_FULL_DUP) {
6663                         MP_WritePhyUshort(sc, 0x1F, 0x0006);
6664                         MP_WritePhyUshort(sc, 0x00, 0x5a30);
6665                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
6666                         if (CSR_READ_1(sc, RE_PHY_STATUS) & (RL_PHY_STATUS_10M | RL_PHY_STATUS_100M))
6667                                 CSR_WRITE_4(sc, RE_TXCFG, (CSR_READ_4(sc, RE_TXCFG) & ~BIT_19) | BIT_25);
6668
6669                 } else {
6670                         MP_WritePhyUshort(sc, 0x1F, 0x0006);
6671                         MP_WritePhyUshort(sc, 0x00, 0x5a00);
6672                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
6673                         if (CSR_READ_1(sc, RE_PHY_STATUS) & (RL_PHY_STATUS_10M | RL_PHY_STATUS_100M))
6674                                 CSR_WRITE_4(sc, RE_TXCFG, (CSR_READ_4(sc, RE_TXCFG) & ~BIT_19) | RE_TXCFG_IFG);
6675                 }
6676         } else if ((sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
6677                     sc->re_type == MACFG_58 || sc->re_type == MACFG_59 ||
6678                     sc->re_type == MACFG_60 || sc->re_type == MACFG_61 ||
6679                     sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
6680                     sc->re_type == MACFG_68 || sc->re_type == MACFG_69) &&
6681                    (ifp->if_flags & IFF_UP)) {
6682                 if (CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_FULL_DUP)
6683                         CSR_WRITE_4(sc, RE_TXCFG, (CSR_READ_4(sc, RE_TXCFG) | (BIT_24 | BIT_25)) & ~BIT_19);
6684                 else
6685                         CSR_WRITE_4(sc, RE_TXCFG, (CSR_READ_4(sc, RE_TXCFG) | BIT_25) & ~(BIT_19 | BIT_24));
6686         }
6687
6688         if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
6689             sc->re_type == MACFG_61 || sc->re_type == MACFG_62) {
6690                 /*half mode*/
6691                 if (!(CSR_READ_1(sc, RE_PHY_STATUS) & RL_PHY_STATUS_FULL_DUP)) {
6692                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
6693                         MP_WritePhyUshort(sc, MII_ANAR, MP_ReadPhyUshort(sc, MII_ANAR)&~(ANAR_PAUSE_SYM |ANAR_PAUSE_ASYM));
6694                 }
6695         }
6696
6697 #ifndef __DragonFly__
6698         re_init_unlock(sc);
6699 #endif
6700 }
6701
6702 #ifndef __DragonFly__
6703 static void re_link_down_patch(struct re_softc *sc)
6704 {
6705         struct ifnet            *ifp;
6706
6707         ifp = RE_GET_IFNET(sc);
6708
6709         re_txeof(sc);
6710         re_rxeof(sc);
6711         re_stop(sc);
6712
6713         re_ifmedia_upd(ifp);
6714 }
6715
6716 /*
6717  * Check Link Status.
6718  */
6719 static void re_check_link_status(struct re_softc *sc)
6720 {
6721         u_int8_t        link_state;
6722         struct ifnet            *ifp;
6723
6724         ifp = RE_GET_IFNET(sc);
6725
6726         if (re_link_ok(sc)) {
6727                 link_state = LINK_STATE_UP;
6728         } else {
6729                 link_state = LINK_STATE_DOWN;
6730         }
6731
6732         if (link_state != sc->link_state) {
6733                 sc->link_state = link_state;
6734                 if (link_state == LINK_STATE_UP) {
6735                         re_link_on_patch(sc);
6736                         re_link_state_change(ifp, LINK_STATE_UP);
6737                 } else {
6738                         re_link_state_change(ifp, LINK_STATE_DOWN);
6739                         re_link_down_patch(sc);
6740                 }
6741         }
6742 }
6743
6744 static void re_init_timer(struct re_softc *sc)
6745 {
6746 #ifdef RE_USE_NEW_CALLOUT_FUN
6747         callout_init(&sc->re_stat_ch, CALLOUT_MPSAFE);
6748 #else
6749         callout_handle_init(&sc->re_stat_ch);
6750 #endif
6751 }
6752
6753 static void re_stop_timer(struct re_softc *sc)
6754 {
6755 #ifdef RE_USE_NEW_CALLOUT_FUN
6756         callout_stop(&sc->re_stat_ch);
6757 #else
6758         untimeout(re_tick, sc, sc->re_stat_ch);
6759 #endif
6760 }
6761
6762 static void re_start_timer(struct re_softc *sc)
6763 {
6764 #ifdef RE_USE_NEW_CALLOUT_FUN
6765         callout_reset(&sc->re_stat_ch, hz, re_tick, sc);
6766 #else
6767         re_stop_timer(sc);
6768         sc->re_stat_ch = timeout(re_tick, sc, hz);
6769 #endif
6770 }
6771
6772 static void re_tick(xsc)
6773 void                    *xsc;
6774 {
6775         /*called per second*/
6776         struct re_softc         *sc;
6777         int                     s;
6778
6779         s = splimp();
6780
6781         sc = xsc;
6782         /*mii = device_get_softc(sc->re_miibus);
6783
6784         mii_tick(mii);*/
6785
6786         splx(s);
6787
6788         RE_LOCK(sc);
6789
6790         if (sc->re_link_chg_det == 1) {
6791                 re_check_link_status(sc);
6792                 re_start_timer(sc);
6793         }
6794
6795         RE_UNLOCK(sc);
6796
6797         return;
6798 }
6799
6800 #if OS_VER < VERSION(7,0)
6801 static void re_watchdog(ifp)
6802 struct ifnet            *ifp;
6803 {
6804         struct re_softc         *sc;
6805
6806         sc = ifp->if_softc;
6807
6808         printf("re%d: watchdog timeout\n", sc->re_unit);
6809 #if OS_VER < VERSION(11,0)
6810         ifp->if_oerrors++;
6811 #else
6812         if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
6813 #endif
6814
6815         re_txeof(sc);
6816         re_rxeof(sc);
6817         re_init(sc);
6818
6819         return;
6820 }
6821 #endif
6822 #endif  /* !__DragonFly__ */
6823
6824 /*
6825  * Set media options.
6826  */
6827 static int re_ifmedia_upd(struct ifnet *ifp)
6828 {
6829         struct re_softc *sc = ifp->if_softc;
6830         struct ifmedia  *ifm = &sc->media;
6831         int anar;
6832         int gbcr;
6833
6834         if (IFM_TYPE(ifm->ifm_media) != IFM_ETHER)
6835                 return(EINVAL);
6836
6837         if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
6838                 //Disable Giga Lite
6839                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
6840                 ClearEthPhyBit(sc, 0x14, BIT_9);
6841                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
6842                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
6843         }
6844
6845
6846         switch (IFM_SUBTYPE(ifm->ifm_media)) {
6847         case IFM_AUTO:
6848                 anar = ANAR_TX_FD |
6849                        ANAR_TX |
6850                        ANAR_10_FD |
6851                        ANAR_10;
6852                 gbcr = GTCR_ADV_1000TFDX |
6853                        GTCR_ADV_1000THDX;
6854                 break;
6855         case IFM_1000_SX:
6856 #ifndef __DragonFly__
6857 #if OS_VER < 500000
6858         case IFM_1000_TX:
6859 #else
6860         case IFM_1000_T:
6861 #endif
6862 #else   /* __DragonFly__ */
6863         case IFM_1000_T:
6864 #endif  /* !__DragonFly__ */
6865                 anar = ANAR_TX_FD |
6866                        ANAR_TX |
6867                        ANAR_10_FD |
6868                        ANAR_10;
6869                 gbcr = GTCR_ADV_1000TFDX |
6870                        GTCR_ADV_1000THDX;
6871                 break;
6872         case IFM_100_TX:
6873                 gbcr = MP_ReadPhyUshort(sc, MII_100T2CR) &
6874                        ~(GTCR_ADV_1000TFDX | GTCR_ADV_1000THDX);
6875                 if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
6876                         anar = ANAR_TX_FD |
6877                                ANAR_TX |
6878                                ANAR_10_FD |
6879                                ANAR_10;
6880                 } else {
6881                         anar = ANAR_TX |
6882                                ANAR_10_FD |
6883                                ANAR_10;
6884                 }
6885                 break;
6886         case IFM_10_T:
6887                 gbcr = MP_ReadPhyUshort(sc, MII_100T2CR) &
6888                        ~(GTCR_ADV_1000TFDX | GTCR_ADV_1000THDX);
6889                 if ((ifm->ifm_media & IFM_GMASK) == IFM_FDX) {
6890                         anar = ANAR_10_FD |
6891                                ANAR_10;
6892                 } else {
6893                         anar = ANAR_10;
6894                 }
6895
6896                 if (sc->re_type == MACFG_13) {
6897                         MP_WritePhyUshort(sc, MII_BMCR, 0x8000);
6898                 }
6899
6900                 break;
6901         default:
6902 #ifndef __DragonFly__
6903                 printf("re%d: Unsupported media type\n", sc->re_unit);
6904                 return(0);
6905 #else
6906                 if_printf(ifp, "Unsupported media type\n");
6907                 return (EOPNOTSUPP);
6908 #endif
6909         }
6910
6911         MP_WritePhyUshort(sc, 0x1F, 0x0000);
6912         if (sc->re_device_id==RT_DEVICEID_8169 || sc->re_device_id==RT_DEVICEID_8169SC ||
6913             sc->re_device_id==RT_DEVICEID_8168 || sc->re_device_id==RT_DEVICEID_8161) {
6914                 MP_WritePhyUshort(sc, MII_ANAR, anar | 0x0800 | ANAR_FC);
6915                 MP_WritePhyUshort(sc, MII_100T2CR, gbcr);
6916                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
6917         } else if (sc->re_type == MACFG_36) {
6918                 MP_WritePhyUshort(sc, MII_ANAR, anar | 0x0800 | ANAR_FC);
6919                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
6920         } else {
6921                 MP_WritePhyUshort(sc, MII_ANAR, anar | 1);
6922                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
6923         }
6924
6925         return(0);
6926 }
6927
6928 /*
6929  * Report current media status.
6930  */
6931 static void re_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
6932 {
6933         struct re_softc         *sc;
6934
6935         sc = ifp->if_softc;
6936
6937         RE_LOCK(sc);
6938
6939         ifmr->ifm_status = IFM_AVALID;
6940         ifmr->ifm_active = IFM_ETHER;
6941
6942         if (re_link_ok(sc)) {
6943                 unsigned char msr;
6944
6945                 ifmr->ifm_status |= IFM_ACTIVE;
6946
6947                 msr = CSR_READ_1(sc, RE_PHY_STATUS);
6948                 if (msr & RL_PHY_STATUS_FULL_DUP)
6949                         ifmr->ifm_active |= IFM_FDX;
6950                 else
6951                         ifmr->ifm_active |= IFM_HDX;
6952
6953                 if (msr & RL_PHY_STATUS_10M)
6954                         ifmr->ifm_active |= IFM_10_T;
6955                 else if (msr & RL_PHY_STATUS_100M)
6956                         ifmr->ifm_active |= IFM_100_TX;
6957                 else if (msr & RL_PHY_STATUS_1000MF)
6958                         ifmr->ifm_active |= IFM_1000_T;
6959 #ifdef __DragonFly__
6960         } else {
6961                 if (IFM_SUBTYPE(sc->media.ifm_media) == IFM_AUTO)
6962                         ifmr->ifm_active |= IFM_NONE;
6963                 else
6964                         ifmr->ifm_active |= sc->media.ifm_media;
6965 #endif
6966         }
6967
6968         RE_UNLOCK(sc);
6969
6970         return;
6971 }
6972
6973 static int re_enable_EEE(struct re_softc *sc)
6974 {
6975         int ret;
6976         u_int16_t data;
6977         u_int16_t PhyRegValue;
6978         u_int32_t WaitCnt;
6979
6980         ret = 0;
6981         switch (sc->re_type) {
6982         case MACFG_42:
6983         case MACFG_43:
6984                 re_eri_write(sc, 0x1B0, 2, 0xED03, ERIAR_ExGMAC);
6985                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
6986                 if (CSR_READ_1(sc,0xEF) & 0x02) {
6987                         MP_WritePhyUshort(sc, 0x10, 0x731F);
6988                         MP_WritePhyUshort(sc, 0x19, 0x7630);
6989                 } else {
6990                         MP_WritePhyUshort(sc, 0x10, 0x711F);
6991                         MP_WritePhyUshort(sc, 0x19, 0x7030);
6992                 }
6993                 MP_WritePhyUshort(sc, 0x1A, 0x1506);
6994                 MP_WritePhyUshort(sc, 0x1B, 0x0551);
6995                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
6996                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
6997                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
6998                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
6999                 MP_WritePhyUshort(sc, 0x0E, 0x0002);
7000                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
7001
7002                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7003                 MP_WritePhyUshort(sc, 0x0D, 0x0003);
7004                 MP_WritePhyUshort(sc, 0x0E, 0x0015);
7005                 MP_WritePhyUshort(sc, 0x0D, 0x4003);
7006                 MP_WritePhyUshort(sc, 0x0E, 0x0002);
7007                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
7008
7009                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
7010                 break;
7011
7012         case MACFG_53:
7013         case MACFG_54:
7014         case MACFG_55:
7015                 re_eri_write(sc, 0x1B0, 2, 0xED03, ERIAR_ExGMAC);
7016                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
7017                 MP_WritePhyUshort(sc, 0x10, 0x731F);
7018                 MP_WritePhyUshort(sc, 0x19, 0x7630);
7019                 MP_WritePhyUshort(sc, 0x1A, 0x1506);
7020                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7021                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
7022                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
7023                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
7024                 MP_WritePhyUshort(sc, 0x0E, 0x0002);
7025                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
7026
7027                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
7028                 break;
7029
7030         case MACFG_36:
7031         case MACFG_37:
7032                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
7033                 MP_WritePhyUshort(sc, 0x1E, 0x0020);
7034                 data = MP_ReadPhyUshort(sc, 0x15) | 0x0100;
7035                 MP_WritePhyUshort(sc, 0x15, data);
7036                 MP_WritePhyUshort(sc, 0x1F, 0x0006);
7037                 MP_WritePhyUshort(sc, 0x00, 0x5A30);
7038                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7039                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
7040                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
7041                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
7042                 MP_WritePhyUshort(sc, 0x0E, 0x0006);
7043                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
7044                 if ((CSR_READ_1(sc, RE_CFG4)&RL_CFG4_CUSTOMIZED_LED) && (CSR_READ_1(sc, RE_MACDBG) & BIT_7)) {
7045                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
7046                         MP_WritePhyUshort(sc, 0x05, 0x8AC8);
7047                         MP_WritePhyUshort(sc, 0x06, CSR_READ_1(sc, RE_CUSTOM_LED));
7048                         MP_WritePhyUshort(sc, 0x05, 0x8B82);
7049                         data = MP_ReadPhyUshort(sc, 0x06) | 0x0010;
7050                         MP_WritePhyUshort(sc, 0x05, 0x8B82);
7051                         MP_WritePhyUshort(sc, 0x06, data);
7052                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
7053                 }
7054                 break;
7055
7056         case MACFG_50:
7057         case MACFG_51:
7058         case MACFG_52:
7059                 data = re_eri_read(sc, 0x1B0 ,4,ERIAR_ExGMAC) | 0x0003;
7060                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
7061                 MP_WritePhyUshort(sc,0x1F , 0x0007);
7062                 MP_WritePhyUshort(sc,0x1E , 0x0020);
7063                 data = MP_ReadPhyUshort(sc, 0x15)|0x0100;
7064                 MP_WritePhyUshort(sc,0x15 , data);
7065                 MP_WritePhyUshort(sc,0x1F , 0x0005);
7066                 MP_WritePhyUshort(sc,0x05 , 0x8B85);
7067                 data = MP_ReadPhyUshort(sc, 0x06)|0x2000;
7068                 MP_WritePhyUshort(sc,0x06 , data);
7069                 MP_WritePhyUshort(sc,0x1F , 0x0000);
7070                 MP_WritePhyUshort(sc,0x0D , 0x0007);
7071                 MP_WritePhyUshort(sc,0x0E , 0x003C);
7072                 MP_WritePhyUshort(sc,0x0D , 0x4007);
7073                 MP_WritePhyUshort(sc,0x0E , 0x0006);
7074                 MP_WritePhyUshort(sc,0x1D , 0x0000);
7075                 break;
7076
7077         case MACFG_38:
7078         case MACFG_39:
7079                 data = re_eri_read(sc, 0x1B0 ,4,ERIAR_ExGMAC);
7080                 data |= BIT_1 | BIT_0;
7081                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
7082                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
7083                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
7084                 MP_WritePhyUshort(sc, 0x1e, 0x0020);
7085                 data = MP_ReadPhyUshort(sc, 0x15);
7086                 data |= BIT_8;
7087                 MP_WritePhyUshort(sc, 0x15, data);
7088                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
7089                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
7090                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
7091                 data = MP_ReadPhyUshort(sc, 0x06);
7092                 data |= BIT_13;
7093                 MP_WritePhyUshort(sc, 0x06, data);
7094                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7095                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
7096                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
7097                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
7098                 MP_WritePhyUshort(sc, 0x0E, 0x0006);
7099                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
7100                 break;
7101
7102         case MACFG_56:
7103         case MACFG_57:
7104         case MACFG_58:
7105         case MACFG_59:
7106         case MACFG_60:
7107         case MACFG_61:
7108         case MACFG_62:
7109         case MACFG_67:
7110         case MACFG_68:
7111         case MACFG_69:
7112                 data = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
7113                 data |= BIT_1 | BIT_0;
7114                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
7115                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
7116                 data = MP_ReadPhyUshort(sc, 0x11);
7117                 MP_WritePhyUshort(sc, 0x11, data | BIT_4);
7118                 MP_WritePhyUshort(sc, 0x1F, 0x0A5D);
7119                 MP_WritePhyUshort(sc, 0x10, 0x0006);
7120                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7121                 break;
7122
7123         default:
7124                 ret = -EOPNOTSUPP;
7125                 break;
7126         }
7127
7128         switch (sc->re_type) {
7129         case MACFG_68:
7130         case MACFG_69:
7131                 MP_WritePhyUshort(sc, 0x1F, 0x0A4A);
7132                 SetEthPhyBit(sc, 0x11, BIT_9);
7133                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
7134                 SetEthPhyBit(sc, 0x14, BIT_7);
7135                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7136                 break;
7137         }
7138
7139         /*Advanced EEE*/
7140         switch (sc->re_type) {
7141         case MACFG_58:
7142         case MACFG_59:
7143         case MACFG_60:
7144         case MACFG_68:
7145         case MACFG_69:
7146                 MP_WritePhyUshort(sc, 0x1F, 0x0B82);
7147                 SetEthPhyBit(sc, 0x10, BIT_4);
7148                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7149
7150                 MP_WritePhyUshort(sc,0x1F, 0x0B80);
7151                 WaitCnt = 0;
7152                 do {
7153                         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
7154                         PhyRegValue &= 0x0040;
7155                         DELAY(50);
7156                         DELAY(50);
7157                         WaitCnt++;
7158                 } while(PhyRegValue != 0x0040 && WaitCnt <1000);
7159
7160                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7161                 break;
7162         }
7163
7164         switch (sc->re_type) {
7165         case MACFG_59:
7166                 re_eri_write(sc, 0x1EA, 1, 0xFA, ERIAR_ExGMAC);
7167
7168                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
7169                 data = MP_ReadPhyUshort(sc, 0x10);
7170                 if (data & BIT_10) {
7171                         MP_WritePhyUshort(sc, 0x1F, 0x0A42);
7172                         data = MP_ReadPhyUshort(sc, 0x16);
7173                         data &= ~(BIT_1);
7174                         MP_WritePhyUshort(sc, 0x16, data);
7175                 } else {
7176                         MP_WritePhyUshort(sc, 0x1F, 0x0A42);
7177                         data = MP_ReadPhyUshort(sc, 0x16);
7178                         data |= BIT_1;
7179                         MP_WritePhyUshort(sc, 0x16, data);
7180                 }
7181                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7182                 break;
7183         case MACFG_60:
7184                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
7185                 data |= BIT_0;
7186                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
7187                 data = MP_ReadMcuAccessRegWord(sc, 0xE056);
7188                 data &= 0xFF0F;
7189                 data |= (BIT_4 | BIT_5 | BIT_6);
7190                 MP_WriteMcuAccessRegWord(sc, 0xE056, data);
7191
7192                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
7193                 data = MP_ReadPhyUshort(sc, 0x10);
7194                 if (data & BIT_10) {
7195                         MP_WritePhyUshort(sc, 0x1F, 0x0A42);
7196                         data = MP_ReadPhyUshort(sc, 0x16);
7197                         data &= ~(BIT_1);
7198                         MP_WritePhyUshort(sc, 0x16, data);
7199                 } else {
7200                         MP_WritePhyUshort(sc, 0x1F, 0x0A42);
7201                         data = MP_ReadPhyUshort(sc, 0x16);
7202                         data |= BIT_1;
7203                         MP_WritePhyUshort(sc, 0x16, data);
7204                 }
7205                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7206                 break;
7207         case MACFG_61:
7208         case MACFG_62:
7209         case MACFG_67:
7210                 OOB_mutex_lock(sc);
7211                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
7212                 data &= ~BIT_0;
7213                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
7214                 OOB_mutex_unlock(sc);
7215                 data = MP_ReadMcuAccessRegWord(sc, 0xE056);
7216                 data &= 0xFF0F;
7217                 data |= (BIT_4 | BIT_5 | BIT_6);
7218                 MP_WriteMcuAccessRegWord(sc, 0xE056, data);
7219                 break;
7220         case MACFG_68:
7221         case MACFG_69:
7222                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
7223                 data |= BIT_0;
7224                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
7225
7226                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
7227                 data = MP_ReadPhyUshort(sc, 0x10) | BIT_15;
7228                 MP_WritePhyUshort(sc, 0x10, data);
7229
7230                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
7231                 data = MP_ReadPhyUshort(sc, 0x11) | BIT_13 | BIT_14;
7232                 data &= ~(BIT_12);
7233                 MP_WritePhyUshort(sc, 0x11, data);
7234                 break;
7235         }
7236
7237         switch (sc->re_type) {
7238         case MACFG_58:
7239         case MACFG_59:
7240         case MACFG_60:
7241         case MACFG_68:
7242         case MACFG_69:
7243                 MP_WritePhyUshort(sc,0x1F, 0x0B82);
7244                 ClearEthPhyBit(sc, 0x10, BIT_4);
7245                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7246                 break;
7247         }
7248
7249         return ret;
7250 }
7251
7252 static int re_disable_EEE(struct re_softc *sc)
7253 {
7254         int ret;
7255         u_int16_t data;
7256         u_int16_t PhyRegValue;
7257         u_int32_t WaitCnt;
7258
7259         ret = 0;
7260         switch (sc->re_type) {
7261         case MACFG_42:
7262         case MACFG_43:
7263                 re_eri_write(sc, 0x1B0, 2, 0, ERIAR_ExGMAC);
7264                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
7265                 MP_WritePhyUshort(sc, 0x10, 0x401F);
7266                 MP_WritePhyUshort(sc, 0x19, 0x7030);
7267
7268                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7269                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
7270                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
7271                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
7272                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
7273                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
7274
7275                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7276                 MP_WritePhyUshort(sc, 0x0D, 0x0003);
7277                 MP_WritePhyUshort(sc, 0x0E, 0x0015);
7278                 MP_WritePhyUshort(sc, 0x0D, 0x4003);
7279                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
7280                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
7281
7282                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
7283                 break;
7284
7285         case MACFG_53:
7286                 re_eri_write(sc, 0x1B0, 2, 0, ERIAR_ExGMAC);
7287                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
7288                 MP_WritePhyUshort(sc, 0x10, 0x401F);
7289                 MP_WritePhyUshort(sc, 0x19, 0x7030);
7290
7291                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7292                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
7293                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
7294                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
7295                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
7296                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
7297
7298                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
7299                 break;
7300
7301         case MACFG_54:
7302         case MACFG_55:
7303                 re_eri_write(sc, 0x1B0, 2, 0, ERIAR_ExGMAC);
7304                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
7305                 MP_WritePhyUshort(sc, 0x10, 0xC07F);
7306                 MP_WritePhyUshort(sc, 0x19, 0x7030);
7307                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7308
7309                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7310                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
7311                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
7312                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
7313                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
7314                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
7315
7316                 MP_WritePhyUshort(sc, MII_BMCR, BMCR_AUTOEN | BMCR_STARTNEG);
7317                 break;
7318
7319         case MACFG_36:
7320         case MACFG_37:
7321                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
7322                 MP_WritePhyUshort(sc, 0x1E, 0x0020);
7323                 data = MP_ReadPhyUshort(sc, 0x15) & ~0x0100;
7324                 MP_WritePhyUshort(sc, 0x15, data);
7325                 MP_WritePhyUshort(sc, 0x1F, 0x0006);
7326                 MP_WritePhyUshort(sc, 0x00, 0x5A00);
7327                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7328                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
7329                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
7330                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
7331                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
7332                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
7333                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7334                 if (CSR_READ_1(sc, RE_CFG4) & RL_CFG4_CUSTOMIZED_LED) {
7335                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
7336                         MP_WritePhyUshort(sc, 0x05, 0x8B82);
7337                         data = MP_ReadPhyUshort(sc, 0x06) & ~0x0010;
7338                         MP_WritePhyUshort(sc, 0x05, 0x8B82);
7339                         MP_WritePhyUshort(sc, 0x06, data);
7340                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
7341                 }
7342                 break;
7343
7344         case MACFG_50:
7345         case MACFG_51:
7346         case MACFG_52:
7347                 data = re_eri_read(sc,0x1B0 ,4,ERIAR_ExGMAC)& ~0x0003;
7348                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
7349                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
7350                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
7351                 data = MP_ReadPhyUshort(sc, 0x06) & ~0x2000;
7352                 MP_WritePhyUshort(sc, 0x06, data);
7353                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
7354                 MP_WritePhyUshort(sc, 0x1E, 0x0020);
7355                 data = MP_ReadPhyUshort(sc, 0x15) & ~0x0100;
7356                 MP_WritePhyUshort(sc,0x15 , data);
7357                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7358                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
7359                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
7360                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
7361                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
7362                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
7363                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7364                 break;
7365
7366         case MACFG_38:
7367         case MACFG_39:
7368                 data = re_eri_read(sc,0x1B0 ,4,ERIAR_ExGMAC);
7369                 data &= ~(BIT_1 | BIT_0);
7370                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
7371                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
7372                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
7373                 data = MP_ReadPhyUshort(sc, 0x06);
7374                 data &= ~BIT_13;
7375                 MP_WritePhyUshort(sc, 0x06, data);
7376                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
7377                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
7378                 MP_WritePhyUshort(sc, 0x1e, 0x0020);
7379                 data = MP_ReadPhyUshort(sc, 0x15);
7380                 data &= ~BIT_8;
7381                 MP_WritePhyUshort(sc, 0x15, data);
7382                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
7383                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7384                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
7385                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
7386                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
7387                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
7388                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
7389                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7390                 break;
7391
7392         case MACFG_56:
7393         case MACFG_57:
7394         case MACFG_58:
7395         case MACFG_59:
7396         case MACFG_60:
7397         case MACFG_61:
7398         case MACFG_62:
7399         case MACFG_67:
7400         case MACFG_68:
7401         case MACFG_69:
7402                 data = re_eri_read(sc, 0x1B0, 4, ERIAR_ExGMAC);
7403                 data &= ~(BIT_1 | BIT_0);
7404                 re_eri_write(sc, 0x1B0, 4, data, ERIAR_ExGMAC);
7405                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
7406                 data = MP_ReadPhyUshort(sc, 0x11);
7407                 MP_WritePhyUshort(sc, 0x11, data & ~BIT_4);
7408                 MP_WritePhyUshort(sc, 0x1F, 0x0A5D);
7409                 MP_WritePhyUshort(sc, 0x10, 0x0000);
7410                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7411                 break;
7412
7413         default:
7414                 ret = -EOPNOTSUPP;
7415                 break;
7416         }
7417
7418         switch (sc->re_type) {
7419         case MACFG_68:
7420         case MACFG_69:
7421                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
7422                 ClearEthPhyBit(sc, 0x14, BIT_7);
7423                 MP_WritePhyUshort(sc, 0x1F, 0x0A4A);
7424                 ClearEthPhyBit(sc, 0x11, BIT_9);
7425                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7426                 break;
7427         }
7428
7429         /*Advanced EEE*/
7430         switch (sc->re_type) {
7431         case MACFG_58:
7432         case MACFG_59:
7433         case MACFG_60:
7434         case MACFG_68:
7435         case MACFG_69:
7436                 MP_WritePhyUshort(sc, 0x1F, 0x0B82);
7437                 SetEthPhyBit(sc, 0x10, BIT_4);
7438                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7439
7440                 MP_WritePhyUshort(sc,0x1F, 0x0B80);
7441                 WaitCnt = 0;
7442                 do {
7443                         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
7444                         PhyRegValue &= 0x0040;
7445                         DELAY(50);
7446                         DELAY(50);
7447                         WaitCnt++;
7448                 } while(PhyRegValue != 0x0040 && WaitCnt <1000);
7449
7450                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7451                 break;
7452         }
7453
7454         switch (sc->re_type) {
7455         case MACFG_59:
7456                 re_eri_write(sc, 0x1EA, 1, 0x00, ERIAR_ExGMAC);
7457
7458                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
7459                 data = MP_ReadPhyUshort(sc, 0x16);
7460                 data &= ~(BIT_1);
7461                 MP_WritePhyUshort(sc, 0x16, data);
7462                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7463                 break;
7464         case MACFG_60:
7465                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
7466                 data &= ~(BIT_0);
7467                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
7468
7469                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
7470                 data = MP_ReadPhyUshort(sc, 0x16);
7471                 data &= ~(BIT_1);
7472                 MP_WritePhyUshort(sc, 0x16, data);
7473                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7474                 break;
7475         case MACFG_61:
7476         case MACFG_62:
7477         case MACFG_67:
7478                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
7479                 data &= ~(BIT_0);
7480                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
7481                 break;
7482         case MACFG_68:
7483         case MACFG_69:
7484                 data = MP_ReadMcuAccessRegWord(sc, 0xE052);
7485                 data &= ~(BIT_0);
7486                 MP_WriteMcuAccessRegWord(sc, 0xE052, data);
7487
7488                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
7489                 data = MP_ReadPhyUshort(sc, 0x10) & ~(BIT_15);
7490                 MP_WritePhyUshort(sc, 0x10, data);
7491
7492                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
7493                 data = MP_ReadPhyUshort(sc, 0x11) & ~(BIT_12 | BIT_13 | BIT_14);
7494                 MP_WritePhyUshort(sc, 0x11, data);
7495                 break;
7496         }
7497
7498         switch (sc->re_type) {
7499         case MACFG_58:
7500         case MACFG_59:
7501         case MACFG_60:
7502         case MACFG_68:
7503         case MACFG_69:
7504                 MP_WritePhyUshort(sc,0x1F, 0x0B82);
7505                 ClearEthPhyBit(sc, 0x10, BIT_4);
7506                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7507                 break;
7508         }
7509
7510         return ret;
7511 }
7512
7513 static int re_phy_ram_code_check(struct re_softc *sc)
7514 {
7515         u_int16_t PhyRegValue;
7516         u_int32_t WaitCnt;
7517         int retval = TRUE;
7518
7519         switch(sc->re_type) {
7520         case MACFG_56:
7521                 MP_WritePhyUshort(sc, 0x1f, 0x0A40);
7522                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
7523                 PhyRegValue &= ~(BIT_11);
7524                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
7525
7526
7527                 MP_WritePhyUshort(sc, 0x1f, 0x0A00);
7528                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
7529                 PhyRegValue &= ~(BIT_12 | BIT_13 | BIT_14 | BIT_15);
7530                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
7531
7532                 MP_WritePhyUshort(sc, 0x1f, 0x0A43);
7533                 MP_WritePhyUshort(sc, 0x13, 0x8010);
7534                 PhyRegValue = MP_ReadPhyUshort(sc, 0x14);
7535                 PhyRegValue &= ~(BIT_11);
7536                 MP_WritePhyUshort(sc, 0x14, PhyRegValue);
7537
7538                 MP_WritePhyUshort(sc,0x1f, 0x0B82);
7539                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
7540                 PhyRegValue |= BIT_4;
7541                 MP_WritePhyUshort(sc,0x10, PhyRegValue);
7542
7543                 MP_WritePhyUshort(sc,0x1f, 0x0B80);
7544                 WaitCnt = 0;
7545                 do {
7546                         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
7547                         PhyRegValue &= 0x0040;
7548                         DELAY(50);
7549                         DELAY(50);
7550                         WaitCnt++;
7551                 } while(PhyRegValue != 0x0040 && WaitCnt <1000);
7552
7553                 if (WaitCnt == 1000) {
7554                         retval = FALSE ;
7555                 }
7556
7557                 MP_WritePhyUshort(sc, 0x1f, 0x0A40);
7558                 MP_WritePhyUshort(sc, 0x10, 0x0140);
7559
7560                 MP_WritePhyUshort(sc, 0x1f, 0x0A4A);
7561                 PhyRegValue = MP_ReadPhyUshort(sc, 0x13);
7562                 PhyRegValue &= ~(BIT_6);
7563                 PhyRegValue |= (BIT_7);
7564                 MP_WritePhyUshort(sc, 0x13, PhyRegValue);
7565
7566                 MP_WritePhyUshort(sc, 0x1f, 0x0A44);
7567                 PhyRegValue = MP_ReadPhyUshort(sc, 0x14);
7568                 PhyRegValue |= (BIT_2);
7569                 MP_WritePhyUshort(sc, 0x14, PhyRegValue);
7570
7571                 MP_WritePhyUshort(sc, 0x1f, 0x0A50);
7572                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
7573                 PhyRegValue |= (BIT_11|BIT_12);
7574                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
7575
7576                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
7577                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
7578                 PhyRegValue &= ~(BIT_4);
7579                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
7580
7581                 MP_WritePhyUshort(sc,0x1f, 0x0A22);
7582                 WaitCnt = 0;
7583                 do {
7584                         PhyRegValue = MP_ReadPhyUshort(sc, 0x12);
7585                         PhyRegValue &= 0x0010;
7586                         DELAY(50);
7587                         DELAY(50);
7588                         WaitCnt++;
7589                 } while(PhyRegValue != 0x0010 && WaitCnt <1000);
7590
7591                 if (WaitCnt == 1000) {
7592                         retval = FALSE;
7593                 }
7594
7595                 MP_WritePhyUshort(sc, 0x1f, 0x0A40);
7596                 MP_WritePhyUshort(sc, 0x10, 0x1040);
7597
7598                 MP_WritePhyUshort(sc, 0x1f, 0x0A4A);
7599                 PhyRegValue = MP_ReadPhyUshort(sc, 0x13);
7600                 PhyRegValue &= ~(BIT_6|BIT_7);
7601                 MP_WritePhyUshort(sc, 0x13, PhyRegValue);
7602
7603                 MP_WritePhyUshort(sc, 0x1f, 0x0A44);
7604                 PhyRegValue = MP_ReadPhyUshort(sc, 0x14);
7605                 PhyRegValue &= ~(BIT_2);
7606                 MP_WritePhyUshort(sc, 0x14, PhyRegValue);
7607
7608                 MP_WritePhyUshort(sc, 0x1f, 0x0A50);
7609                 PhyRegValue = MP_ReadPhyUshort(sc, 0x11);
7610                 PhyRegValue &= ~(BIT_11|BIT_12);
7611                 MP_WritePhyUshort(sc, 0x11, PhyRegValue);
7612
7613                 MP_WritePhyUshort(sc, 0x1f, 0x0A43);
7614                 MP_WritePhyUshort(sc, 0x13, 0x8010);
7615                 PhyRegValue = MP_ReadPhyUshort(sc, 0x14);
7616                 PhyRegValue |= (BIT_11);
7617                 MP_WritePhyUshort(sc, 0x14, PhyRegValue);
7618
7619                 MP_WritePhyUshort(sc,0x1f, 0x0B82);
7620                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
7621                 PhyRegValue |= BIT_4;
7622                 MP_WritePhyUshort(sc,0x10, PhyRegValue);
7623
7624                 MP_WritePhyUshort(sc,0x1f, 0x0B80);
7625                 WaitCnt = 0;
7626                 do {
7627                         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
7628                         PhyRegValue &= 0x0040;
7629                         DELAY(50);
7630                         DELAY(50);
7631                         WaitCnt++;
7632                 } while(PhyRegValue != 0x0040 && WaitCnt <1000);
7633
7634                 if (WaitCnt == 1000) {
7635                         retval = FALSE;
7636                 }
7637
7638                 MP_WritePhyUshort(sc, 0x1f, 0x0A20);
7639                 PhyRegValue = MP_ReadPhyUshort(sc, 0x13);
7640                 if (PhyRegValue & BIT_11) {
7641                         if (PhyRegValue & BIT_10) {
7642                                 retval = FALSE;
7643                         }
7644                 }
7645
7646                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
7647                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
7648                 PhyRegValue &= ~(BIT_4);
7649                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
7650
7651                 //delay 2ms
7652                 DELAY(2000);
7653                 break;
7654         default:
7655                 break;
7656         }
7657
7658         MP_WritePhyUshort(sc, 0x1F, 0x0000);
7659
7660         return retval;
7661 }
7662
7663 static void re_set_phy_ram_code_check_fail_flag(struct re_softc *sc)
7664 {
7665         u_int16_t TmpUshort;
7666
7667         switch(sc->re_type) {
7668         case MACFG_56:
7669                 TmpUshort = MP_ReadMcuAccessRegWord(sc, 0xD3C0);
7670                 TmpUshort |= BIT_0;
7671                 MP_WriteMcuAccessRegWord(sc, 0xD3C0, TmpUshort);
7672                 break;
7673         }
7674 }
7675
7676 static void re_hw_phy_config(struct re_softc *sc)
7677 {
7678         u_int16_t Data, PhyRegValue, TmpUshort;
7679         u_int32_t Data_u32;
7680         u_int16_t dout_tapbin;
7681         int     i;
7682         u_int32_t WaitCnt;
7683
7684         if (sc->re_type == MACFG_59 || sc->re_type == MACFG_60 ||
7685             sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
7686             sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
7687                 MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0000);
7688                 MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0500);
7689         }
7690
7691         if (FALSE == re_phy_ram_code_check(sc)) {
7692                 re_set_phy_ram_code_check_fail_flag(sc);
7693                 return;
7694         }
7695
7696         MP_WritePhyUshort(sc, 0x1F, 0x0000);
7697
7698         if (sc->re_type == MACFG_3) {
7699                 CSR_WRITE_1(sc, 0x82, CSR_READ_1(sc, 0x82)|BIT_0);
7700                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7701                 MP_WritePhyUshort(sc, 0x0b, 0x0000);
7702
7703                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
7704                 MP_WritePhyUshort(sc, 0x06, 0x006e);
7705                 MP_WritePhyUshort(sc, 0x08, 0x0708);
7706                 MP_WritePhyUshort(sc, 0x15, 0x4000);
7707                 MP_WritePhyUshort(sc, 0x18, 0x65c7);
7708
7709                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
7710                 MP_WritePhyUshort(sc, 0x03, 0x00a1);
7711                 MP_WritePhyUshort(sc, 0x02, 0x0008);
7712                 MP_WritePhyUshort(sc, 0x01, 0x0120);
7713                 MP_WritePhyUshort(sc, 0x00, 0x1000);
7714                 MP_WritePhyUshort(sc, 0x04, 0x0800);
7715                 MP_WritePhyUshort(sc, 0x04, 0x0000);
7716
7717                 MP_WritePhyUshort(sc, 0x03, 0xff41);
7718                 MP_WritePhyUshort(sc, 0x02, 0xdf60);
7719                 MP_WritePhyUshort(sc, 0x01, 0x0140);
7720                 MP_WritePhyUshort(sc, 0x00, 0x0077);
7721                 MP_WritePhyUshort(sc, 0x04, 0x7800);
7722                 MP_WritePhyUshort(sc, 0x04, 0x7000);
7723
7724                 MP_WritePhyUshort(sc, 0x03, 0x802f);
7725                 MP_WritePhyUshort(sc, 0x02, 0x4f02);
7726                 MP_WritePhyUshort(sc, 0x01, 0x0409);
7727                 MP_WritePhyUshort(sc, 0x00, 0xf0f9);
7728                 MP_WritePhyUshort(sc, 0x04, 0x9800);
7729                 MP_WritePhyUshort(sc, 0x04, 0x9000);
7730
7731                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
7732                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
7733                 MP_WritePhyUshort(sc, 0x01, 0xff95);
7734                 MP_WritePhyUshort(sc, 0x00, 0xba00);
7735                 MP_WritePhyUshort(sc, 0x04, 0xa800);
7736                 MP_WritePhyUshort(sc, 0x04, 0xa000);
7737
7738                 MP_WritePhyUshort(sc, 0x03, 0xff41);
7739                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
7740                 MP_WritePhyUshort(sc, 0x01, 0x0140);
7741                 MP_WritePhyUshort(sc, 0x00, 0x00bb);
7742                 MP_WritePhyUshort(sc, 0x04, 0xb800);
7743                 MP_WritePhyUshort(sc, 0x04, 0xb000);
7744
7745                 MP_WritePhyUshort(sc, 0x03, 0xdf41);
7746                 MP_WritePhyUshort(sc, 0x02, 0xdc60);
7747                 MP_WritePhyUshort(sc, 0x01, 0x6340);
7748                 MP_WritePhyUshort(sc, 0x00, 0x007d);
7749                 MP_WritePhyUshort(sc, 0x04, 0xd800);
7750                 MP_WritePhyUshort(sc, 0x04, 0xd000);
7751
7752                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
7753                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
7754                 MP_WritePhyUshort(sc, 0x01, 0x100a);
7755                 MP_WritePhyUshort(sc, 0x00, 0xa0ff);
7756                 MP_WritePhyUshort(sc, 0x04, 0xf800);
7757                 MP_WritePhyUshort(sc, 0x04, 0xf000);
7758
7759                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
7760                 MP_WritePhyUshort(sc, 0x0b, 0x0000);
7761                 MP_WritePhyUshort(sc, 0x00, 0x9200);
7762
7763                 CSR_WRITE_1(sc, 0x82, 0x0d);
7764         } else if (sc->re_type == MACFG_4) {
7765                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
7766                 MP_WritePhyUshort(sc, 0x01, 0x90D0);
7767                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
7768                 // MP_WritePhyUshort(sc, 0x1e, 0x8c00); /* PHY link down with some Giga switch */
7769         } else if (sc->re_type == MACFG_5) {
7770                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
7771                 MP_WritePhyUshort(sc, 0x04, 0x0000);
7772                 MP_WritePhyUshort(sc, 0x03, 0x00a1);
7773                 MP_WritePhyUshort(sc, 0x02, 0x0008);
7774                 MP_WritePhyUshort(sc, 0x01, 0x0120);
7775                 MP_WritePhyUshort(sc, 0x00, 0x1000);
7776                 MP_WritePhyUshort(sc, 0x04, 0x0800);
7777
7778                 MP_WritePhyUshort(sc, 0x04, 0x9000);
7779                 MP_WritePhyUshort(sc, 0x03, 0x802f);
7780                 MP_WritePhyUshort(sc, 0x02, 0x4f02);
7781                 MP_WritePhyUshort(sc, 0x01, 0x0409);
7782                 MP_WritePhyUshort(sc, 0x00, 0xf099);
7783                 MP_WritePhyUshort(sc, 0x04, 0x9800);
7784
7785                 MP_WritePhyUshort(sc, 0x04, 0xa000);
7786                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
7787                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
7788                 MP_WritePhyUshort(sc, 0x01, 0xff95);
7789                 MP_WritePhyUshort(sc, 0x00, 0xba00);
7790                 MP_WritePhyUshort(sc, 0x04, 0xa800);
7791
7792                 MP_WritePhyUshort(sc, 0x04, 0xf000);
7793                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
7794                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
7795                 MP_WritePhyUshort(sc, 0x01, 0x101a);
7796                 MP_WritePhyUshort(sc, 0x00, 0xa0ff);
7797                 MP_WritePhyUshort(sc, 0x04, 0xf800);
7798                 MP_WritePhyUshort(sc, 0x04, 0x0000);
7799                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
7800
7801                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
7802                 MP_WritePhyUshort(sc, 0x10, 0xf41b);
7803                 MP_WritePhyUshort(sc, 0x14, 0xfb54);
7804                 MP_WritePhyUshort(sc, 0x18, 0xf5c7);
7805                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
7806
7807                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
7808                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
7809                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
7810
7811                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
7812                 MP_WritePhyUshort(sc, 0x10, 0xf01b);
7813
7814         } else if (sc->re_type == MACFG_6) {
7815                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
7816                 MP_WritePhyUshort(sc, 0x04, 0x0000);
7817                 MP_WritePhyUshort(sc, 0x03, 0x00a1);
7818                 MP_WritePhyUshort(sc, 0x02, 0x0008);
7819                 MP_WritePhyUshort(sc, 0x01, 0x0120);
7820                 MP_WritePhyUshort(sc, 0x00, 0x1000);
7821                 MP_WritePhyUshort(sc, 0x04, 0x0800);
7822
7823                 MP_WritePhyUshort(sc, 0x04, 0x9000);
7824                 MP_WritePhyUshort(sc, 0x03, 0x802f);
7825                 MP_WritePhyUshort(sc, 0x02, 0x4f02);
7826                 MP_WritePhyUshort(sc, 0x01, 0x0409);
7827                 MP_WritePhyUshort(sc, 0x00, 0xf099);
7828                 MP_WritePhyUshort(sc, 0x04, 0x9800);
7829
7830                 MP_WritePhyUshort(sc, 0x04, 0xa000);
7831                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
7832                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
7833                 MP_WritePhyUshort(sc, 0x01, 0xff95);
7834                 MP_WritePhyUshort(sc, 0x00, 0xba00);
7835                 MP_WritePhyUshort(sc, 0x04, 0xa800);
7836
7837                 MP_WritePhyUshort(sc, 0x04, 0xf000);
7838                 MP_WritePhyUshort(sc, 0x03, 0xdf01);
7839                 MP_WritePhyUshort(sc, 0x02, 0xdf20);
7840                 MP_WritePhyUshort(sc, 0x01, 0x101a);
7841                 MP_WritePhyUshort(sc, 0x00, 0xa0ff);
7842                 MP_WritePhyUshort(sc, 0x04, 0xf800);
7843                 MP_WritePhyUshort(sc, 0x04, 0x0000);
7844                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
7845
7846                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
7847                 MP_WritePhyUshort(sc, 0x0b, 0x8480);
7848                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
7849
7850                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
7851                 MP_WritePhyUshort(sc, 0x18, 0x67c7);
7852                 MP_WritePhyUshort(sc, 0x04, 0x2000);
7853                 MP_WritePhyUshort(sc, 0x03, 0x002f);
7854                 MP_WritePhyUshort(sc, 0x02, 0x4360);
7855                 MP_WritePhyUshort(sc, 0x01, 0x0109);
7856                 MP_WritePhyUshort(sc, 0x00, 0x3022);
7857                 MP_WritePhyUshort(sc, 0x04, 0x2800);
7858                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
7859
7860                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
7861                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
7862         } else if (sc->re_type == MACFG_14) {
7863                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
7864                 MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) | 0x1000);
7865                 MP_WritePhyUshort(sc, 0x19, MP_ReadPhyUshort(sc, 0x19) | 0x2000);
7866                 MP_WritePhyUshort(sc, 0x10, MP_ReadPhyUshort(sc, 0x10) | 0x8000);
7867
7868                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
7869                 MP_WritePhyUshort(sc, 0x08, 0x441D);
7870                 MP_WritePhyUshort(sc, 0x01, 0x9100);
7871         } else if (sc->re_type == MACFG_15) {
7872                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
7873                 MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) | 0x1000);
7874                 MP_WritePhyUshort(sc, 0x19, MP_ReadPhyUshort(sc, 0x19) | 0x2000);
7875                 MP_WritePhyUshort(sc, 0x10, MP_ReadPhyUshort(sc, 0x10) | 0x8000);
7876
7877                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
7878                 MP_WritePhyUshort(sc, 0x08, 0x441D);
7879                 MP_WritePhyUshort(sc, 0x01, 0x9100);
7880         } else if (sc->re_type == MACFG_17) {
7881                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
7882                 MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) | 0x1000);
7883                 MP_WritePhyUshort(sc, 0x19, MP_ReadPhyUshort(sc, 0x19) | 0x2000);
7884                 MP_WritePhyUshort(sc, 0x10, MP_ReadPhyUshort(sc, 0x10) | 0x8000);
7885
7886                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
7887                 MP_WritePhyUshort(sc, 0x08, 0x441D);
7888
7889                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
7890         } else if (sc->re_type == MACFG_21) {
7891                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
7892                 MP_WritePhyUshort(sc, 0x0B, 0x94B0);
7893
7894                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
7895                 MP_WritePhyUshort(sc, 0x12, 0x6096);
7896                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7897         } else if (sc->re_type == MACFG_22) {
7898                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
7899                 MP_WritePhyUshort(sc, 0x0B, 0x94B0);
7900
7901                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
7902                 MP_WritePhyUshort(sc, 0x12, 0x6096);
7903         } else if (sc->re_type == MACFG_23) {
7904                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
7905                 MP_WritePhyUshort(sc, 0x0B, 0x94B0);
7906
7907                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
7908                 MP_WritePhyUshort(sc, 0x12, 0x6096);
7909         } else if (sc->re_type == MACFG_24) {
7910                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
7911                 MP_WritePhyUshort(sc, 0x12, 0x2300);
7912                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7913                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
7914                 MP_WritePhyUshort(sc, 0x16, 0x000A);
7915                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7916
7917                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
7918                 MP_WritePhyUshort(sc, 0x12, 0xC096);
7919                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7920
7921                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
7922                 MP_WritePhyUshort(sc, 0x00, 0x88DE);
7923                 MP_WritePhyUshort(sc, 0x01, 0x82B1);
7924                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7925
7926                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
7927                 MP_WritePhyUshort(sc, 0x08, 0x9E30);
7928                 MP_WritePhyUshort(sc, 0x09, 0x01F0);
7929                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7930
7931                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
7932                 MP_WritePhyUshort(sc, 0x0A, 0x5500);
7933                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7934
7935                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
7936                 MP_WritePhyUshort(sc, 0x03, 0x7002);
7937                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7938
7939                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7940                 MP_WritePhyUshort(sc, 0x14, MP_ReadPhyUshort(sc, 0x14) | BIT_5);
7941                 MP_WritePhyUshort(sc, 0x0d, MP_ReadPhyUshort(sc, 0x0d) | BIT_5);
7942         } else if (sc->re_type == MACFG_25) {
7943                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
7944                 MP_WritePhyUshort(sc, 0x12, 0x2300);
7945                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
7946                 MP_WritePhyUshort(sc, 0x16, 0x0F0A);
7947                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7948
7949                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
7950                 MP_WritePhyUshort(sc, 0x00, 0x88DE);
7951                 MP_WritePhyUshort(sc, 0x01, 0x82B1);
7952                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7953
7954                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
7955                 MP_WritePhyUshort(sc, 0x0C, 0x7EB8);
7956                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7957
7958                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
7959                 MP_WritePhyUshort(sc, 0x06, 0x0761);
7960                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7961
7962                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
7963                 MP_WritePhyUshort(sc, 0x03, 0x802F);
7964                 MP_WritePhyUshort(sc, 0x02, 0x4F02);
7965                 MP_WritePhyUshort(sc, 0x01, 0x0409);
7966                 MP_WritePhyUshort(sc, 0x00, 0xF099);
7967                 MP_WritePhyUshort(sc, 0x04, 0x9800);
7968                 MP_WritePhyUshort(sc, 0x04, 0x9000);
7969                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7970
7971                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7972                 MP_WritePhyUshort(sc, 0x16, MP_ReadPhyUshort(sc , 0x16) | BIT_0);
7973
7974                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7975                 MP_WritePhyUshort(sc, 0x14, MP_ReadPhyUshort(sc , 0x14) | BIT_5);
7976                 MP_WritePhyUshort(sc, 0x0D, MP_ReadPhyUshort(sc , 0x0D) & ~BIT_5);
7977
7978                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
7979                 MP_WritePhyUshort(sc, 0x1D, 0x3D98);
7980                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7981
7982                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
7983                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
7984                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7985         } else if (sc->re_type == MACFG_26) {
7986                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
7987                 MP_WritePhyUshort(sc, 0x12, 0x2300);
7988                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
7989                 MP_WritePhyUshort(sc, 0x16, 0x0F0A);
7990                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7991
7992                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
7993                 MP_WritePhyUshort(sc, 0x00, 0x88DE);
7994                 MP_WritePhyUshort(sc, 0x01, 0x82B1);
7995                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
7996
7997                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
7998                 MP_WritePhyUshort(sc, 0x0C, 0x7EB8);
7999                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8000
8001                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8002                 MP_WritePhyUshort(sc, 0x06, 0x5461);
8003                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8004
8005                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8006                 MP_WritePhyUshort(sc, 0x06, 0x5461);
8007                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8008
8009                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8010                 MP_WritePhyUshort(sc, 0x16, MP_ReadPhyUshort(sc, 0x16) | BIT_0);
8011
8012                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8013                 MP_WritePhyUshort(sc, 0x14, MP_ReadPhyUshort(sc, 0x14) | BIT_5);
8014                 MP_WritePhyUshort(sc, 0x0D, MP_ReadPhyUshort(sc, 0x0D) & ~BIT_5);
8015
8016                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
8017                 MP_WritePhyUshort(sc, 0x1D, 0x3D98);
8018                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8019
8020                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
8021                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
8022                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8023         } else if (sc->re_type == MACFG_27) {
8024                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8025                 MP_WritePhyUshort(sc, 0x0d, MP_ReadPhyUshort(sc, 0x0d) | BIT_5);
8026                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8027
8028                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
8029                 MP_WritePhyUshort(sc, 0x1D, 0x3D98);
8030                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8031
8032                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
8033                 MP_WritePhyUshort(sc, 0x14, 0xCAA3);
8034                 MP_WritePhyUshort(sc, 0x1C, 0x000A);
8035                 MP_WritePhyUshort(sc, 0x18, 0x65D0);
8036
8037                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
8038                 MP_WritePhyUshort(sc, 0x17, 0xB580);
8039                 MP_WritePhyUshort(sc, 0x18, 0xFF54);
8040                 MP_WritePhyUshort(sc, 0x19, 0x3954);
8041
8042                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8043                 MP_WritePhyUshort(sc, 0x0D, 0x310C);
8044                 MP_WritePhyUshort(sc, 0x0E, 0x310C);
8045                 MP_WritePhyUshort(sc, 0x0F, 0x311C);
8046                 MP_WritePhyUshort(sc, 0x06, 0x0761);
8047
8048                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
8049                 MP_WritePhyUshort(sc, 0x18, 0xFF55);
8050                 MP_WritePhyUshort(sc, 0x19, 0x3955);
8051                 MP_WritePhyUshort(sc, 0x18, 0xFF54);
8052                 MP_WritePhyUshort(sc, 0x19, 0x3954);
8053
8054                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
8055                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
8056         } else if (sc->re_type == MACFG_28) {
8057                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8058                 MP_WritePhyUshort(sc, 0x14, MP_ReadPhyUshort(sc, 0x14) | BIT_5);
8059                 MP_WritePhyUshort(sc, 0x0d, MP_ReadPhyUshort(sc, 0x0d) | BIT_5);
8060
8061                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
8062                 MP_WritePhyUshort(sc, 0x14, 0xCAA3);
8063                 MP_WritePhyUshort(sc, 0x1C, 0x000A);
8064                 MP_WritePhyUshort(sc, 0x18, 0x65D0);
8065
8066                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
8067                 MP_WritePhyUshort(sc, 0x17, 0xB580);
8068                 MP_WritePhyUshort(sc, 0x18, 0xFF54);
8069                 MP_WritePhyUshort(sc, 0x19, 0x3954);
8070
8071                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8072                 MP_WritePhyUshort(sc, 0x0D, 0x310C);
8073                 MP_WritePhyUshort(sc, 0x0E, 0x310C);
8074                 MP_WritePhyUshort(sc, 0x0F, 0x311C);
8075                 MP_WritePhyUshort(sc, 0x06, 0x0761);
8076
8077                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
8078                 MP_WritePhyUshort(sc, 0x18, 0xFF55);
8079                 MP_WritePhyUshort(sc, 0x19, 0x3955);
8080                 MP_WritePhyUshort(sc, 0x18, 0xFF54);
8081                 MP_WritePhyUshort(sc, 0x19, 0x3954);
8082
8083                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
8084                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
8085
8086                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8087                 MP_WritePhyUshort(sc, 0x16, MP_ReadPhyUshort(sc, 0x16) | BIT_0);
8088                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8089         } else if (sc->re_type == MACFG_31) {
8090                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
8091                 MP_WritePhyUshort(sc, 0x06, 0x4064);
8092                 MP_WritePhyUshort(sc, 0x07, 0x2863);
8093                 MP_WritePhyUshort(sc, 0x08, 0x059C);
8094                 MP_WritePhyUshort(sc, 0x09, 0x26B4);
8095                 MP_WritePhyUshort(sc, 0x0A, 0x6A19);
8096                 MP_WritePhyUshort(sc, 0x0B, 0xDCC8);
8097                 MP_WritePhyUshort(sc, 0x10, 0xF06D);
8098                 MP_WritePhyUshort(sc, 0x14, 0x7F68);
8099                 MP_WritePhyUshort(sc, 0x18, 0x7FD9);
8100                 MP_WritePhyUshort(sc, 0x1C, 0xF0FF);
8101                 MP_WritePhyUshort(sc, 0x1D, 0x3D9C);
8102                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
8103                 MP_WritePhyUshort(sc, 0x12, 0xF49F);
8104                 MP_WritePhyUshort(sc, 0x13, 0x070B);
8105                 MP_WritePhyUshort(sc, 0x1A, 0x05AD);
8106                 MP_WritePhyUshort(sc, 0x14, 0x94C0);
8107
8108                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8109                 Data = MP_ReadPhyUshort(sc, 0x0B) & 0xFF00;
8110                 Data |= 0x10;
8111                 MP_WritePhyUshort(sc, 0x0B, Data);
8112                 Data = MP_ReadPhyUshort(sc, 0x0C) & 0x00FF;
8113                 Data |= 0xA200;
8114                 MP_WritePhyUshort(sc, 0x0C, Data);
8115
8116                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8117                 MP_WritePhyUshort(sc, 0x06, 0x5561);
8118                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
8119                 MP_WritePhyUshort(sc, 0x05, 0x8332);
8120                 MP_WritePhyUshort(sc, 0x06, 0x5561);
8121
8122                 if (MP_ReadEfuse(sc, 0x01) == 0xb1) {
8123                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
8124                         MP_WritePhyUshort(sc, 0x05, 0x669A);
8125                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
8126                         MP_WritePhyUshort(sc, 0x05, 0x8330);
8127                         MP_WritePhyUshort(sc, 0x06, 0x669A);
8128
8129                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
8130                         Data = MP_ReadPhyUshort(sc, 0x0D);
8131                         if ((Data & 0x00FF) != 0x006C) {
8132                                 Data &= 0xFF00;
8133                                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8134                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0065);
8135                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0066);
8136                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0067);
8137                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0068);
8138                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0069);
8139                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006A);
8140                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006B);
8141                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006C);
8142                         }
8143                 } else {
8144                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
8145                         MP_WritePhyUshort(sc, 0x05, 0x6662);
8146                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
8147                         MP_WritePhyUshort(sc, 0x05, 0x8330);
8148                         MP_WritePhyUshort(sc, 0x06, 0x6662);
8149                 }
8150
8151                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8152                 Data = MP_ReadPhyUshort(sc, 0x0D);
8153                 Data |= 0x300;
8154                 MP_WritePhyUshort(sc, 0x0D, Data);
8155                 Data = MP_ReadPhyUshort(sc, 0x0F);
8156                 Data |= 0x10;
8157                 MP_WritePhyUshort(sc, 0x0F, Data);
8158
8159                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8160                 Data = MP_ReadPhyUshort(sc, 0x02);
8161                 Data &= ~0x600;
8162                 Data |= 0x100;
8163                 MP_WritePhyUshort(sc, 0x02, Data);
8164                 Data = MP_ReadPhyUshort(sc, 0x03);
8165                 Data &= ~0xE000;
8166                 MP_WritePhyUshort(sc, 0x03, Data);
8167
8168                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
8169                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
8170
8171                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
8172                 MP_WritePhyUshort(sc, 0x05, 0x001B);
8173                 if (MP_ReadPhyUshort(sc, 0x06) == 0xBF00) {
8174                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
8175                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
8176                         MP_WritePhyUshort(sc, 0x06, 0x0080);
8177                         MP_WritePhyUshort(sc, 0x05, 0x8000);
8178                         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
8179                         MP_WritePhyUshort(sc, 0x06, 0xfaef);
8180                         MP_WritePhyUshort(sc, 0x06, 0x59ee);
8181                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
8182                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
8183                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
8184                         MP_WritePhyUshort(sc, 0x06, 0x00e0);
8185                         MP_WritePhyUshort(sc, 0x06, 0xf87c);
8186                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
8187                         MP_WritePhyUshort(sc, 0x06, 0x7d59);
8188                         MP_WritePhyUshort(sc, 0x06, 0x0fef);
8189                         MP_WritePhyUshort(sc, 0x06, 0x0139);
8190                         MP_WritePhyUshort(sc, 0x06, 0x029e);
8191                         MP_WritePhyUshort(sc, 0x06, 0x06ef);
8192                         MP_WritePhyUshort(sc, 0x06, 0x1039);
8193                         MP_WritePhyUshort(sc, 0x06, 0x089f);
8194                         MP_WritePhyUshort(sc, 0x06, 0x2aee);
8195                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
8196                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
8197                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
8198                         MP_WritePhyUshort(sc, 0x06, 0x01e0);
8199                         MP_WritePhyUshort(sc, 0x06, 0xf87c);
8200                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
8201                         MP_WritePhyUshort(sc, 0x06, 0x7d58);
8202                         MP_WritePhyUshort(sc, 0x06, 0x409e);
8203                         MP_WritePhyUshort(sc, 0x06, 0x0f39);
8204                         MP_WritePhyUshort(sc, 0x06, 0x46aa);
8205                         MP_WritePhyUshort(sc, 0x06, 0x0bbf);
8206                         MP_WritePhyUshort(sc, 0x06, 0x8290);
8207                         MP_WritePhyUshort(sc, 0x06, 0xd682);
8208                         MP_WritePhyUshort(sc, 0x06, 0x9802);
8209                         MP_WritePhyUshort(sc, 0x06, 0x014f);
8210                         MP_WritePhyUshort(sc, 0x06, 0xae09);
8211                         MP_WritePhyUshort(sc, 0x06, 0xbf82);
8212                         MP_WritePhyUshort(sc, 0x06, 0x98d6);
8213                         MP_WritePhyUshort(sc, 0x06, 0x82a0);
8214                         MP_WritePhyUshort(sc, 0x06, 0x0201);
8215                         MP_WritePhyUshort(sc, 0x06, 0x4fef);
8216                         MP_WritePhyUshort(sc, 0x06, 0x95fe);
8217                         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
8218                         MP_WritePhyUshort(sc, 0x06, 0x05f8);
8219                         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
8220                         MP_WritePhyUshort(sc, 0x06, 0xeef8);
8221                         MP_WritePhyUshort(sc, 0x06, 0xea00);
8222                         MP_WritePhyUshort(sc, 0x06, 0xeef8);
8223                         MP_WritePhyUshort(sc, 0x06, 0xeb00);
8224                         MP_WritePhyUshort(sc, 0x06, 0xe2f8);
8225                         MP_WritePhyUshort(sc, 0x06, 0x7ce3);
8226                         MP_WritePhyUshort(sc, 0x06, 0xf87d);
8227                         MP_WritePhyUshort(sc, 0x06, 0xa511);
8228                         MP_WritePhyUshort(sc, 0x06, 0x1112);
8229                         MP_WritePhyUshort(sc, 0x06, 0xd240);
8230                         MP_WritePhyUshort(sc, 0x06, 0xd644);
8231                         MP_WritePhyUshort(sc, 0x06, 0x4402);
8232                         MP_WritePhyUshort(sc, 0x06, 0x8217);
8233                         MP_WritePhyUshort(sc, 0x06, 0xd2a0);
8234                         MP_WritePhyUshort(sc, 0x06, 0xd6aa);
8235                         MP_WritePhyUshort(sc, 0x06, 0xaa02);
8236                         MP_WritePhyUshort(sc, 0x06, 0x8217);
8237                         MP_WritePhyUshort(sc, 0x06, 0xae0f);
8238                         MP_WritePhyUshort(sc, 0x06, 0xa544);
8239                         MP_WritePhyUshort(sc, 0x06, 0x4402);
8240                         MP_WritePhyUshort(sc, 0x06, 0xae4d);
8241                         MP_WritePhyUshort(sc, 0x06, 0xa5aa);
8242                         MP_WritePhyUshort(sc, 0x06, 0xaa02);
8243                         MP_WritePhyUshort(sc, 0x06, 0xae47);
8244                         MP_WritePhyUshort(sc, 0x06, 0xaf82);
8245                         MP_WritePhyUshort(sc, 0x06, 0x13ee);
8246                         MP_WritePhyUshort(sc, 0x06, 0x834e);
8247                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
8248                         MP_WritePhyUshort(sc, 0x06, 0x834d);
8249                         MP_WritePhyUshort(sc, 0x06, 0x0fee);
8250                         MP_WritePhyUshort(sc, 0x06, 0x834c);
8251                         MP_WritePhyUshort(sc, 0x06, 0x0fee);
8252                         MP_WritePhyUshort(sc, 0x06, 0x834f);
8253                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
8254                         MP_WritePhyUshort(sc, 0x06, 0x8351);
8255                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
8256                         MP_WritePhyUshort(sc, 0x06, 0x834a);
8257                         MP_WritePhyUshort(sc, 0x06, 0xffee);
8258                         MP_WritePhyUshort(sc, 0x06, 0x834b);
8259                         MP_WritePhyUshort(sc, 0x06, 0xffe0);
8260                         MP_WritePhyUshort(sc, 0x06, 0x8330);
8261                         MP_WritePhyUshort(sc, 0x06, 0xe183);
8262                         MP_WritePhyUshort(sc, 0x06, 0x3158);
8263                         MP_WritePhyUshort(sc, 0x06, 0xfee4);
8264                         MP_WritePhyUshort(sc, 0x06, 0xf88a);
8265                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
8266                         MP_WritePhyUshort(sc, 0x06, 0x8be0);
8267                         MP_WritePhyUshort(sc, 0x06, 0x8332);
8268                         MP_WritePhyUshort(sc, 0x06, 0xe183);
8269                         MP_WritePhyUshort(sc, 0x06, 0x3359);
8270                         MP_WritePhyUshort(sc, 0x06, 0x0fe2);
8271                         MP_WritePhyUshort(sc, 0x06, 0x834d);
8272                         MP_WritePhyUshort(sc, 0x06, 0x0c24);
8273                         MP_WritePhyUshort(sc, 0x06, 0x5af0);
8274                         MP_WritePhyUshort(sc, 0x06, 0x1e12);
8275                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
8276                         MP_WritePhyUshort(sc, 0x06, 0x8ce5);
8277                         MP_WritePhyUshort(sc, 0x06, 0xf88d);
8278                         MP_WritePhyUshort(sc, 0x06, 0xaf82);
8279                         MP_WritePhyUshort(sc, 0x06, 0x13e0);
8280                         MP_WritePhyUshort(sc, 0x06, 0x834f);
8281                         MP_WritePhyUshort(sc, 0x06, 0x10e4);
8282                         MP_WritePhyUshort(sc, 0x06, 0x834f);
8283                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8284                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
8285                         MP_WritePhyUshort(sc, 0x06, 0x009f);
8286                         MP_WritePhyUshort(sc, 0x06, 0x0ae0);
8287                         MP_WritePhyUshort(sc, 0x06, 0x834f);
8288                         MP_WritePhyUshort(sc, 0x06, 0xa010);
8289                         MP_WritePhyUshort(sc, 0x06, 0xa5ee);
8290                         MP_WritePhyUshort(sc, 0x06, 0x834e);
8291                         MP_WritePhyUshort(sc, 0x06, 0x01e0);
8292                         MP_WritePhyUshort(sc, 0x06, 0x834e);
8293                         MP_WritePhyUshort(sc, 0x06, 0x7805);
8294                         MP_WritePhyUshort(sc, 0x06, 0x9e9a);
8295                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8296                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
8297                         MP_WritePhyUshort(sc, 0x06, 0x049e);
8298                         MP_WritePhyUshort(sc, 0x06, 0x10e0);
8299                         MP_WritePhyUshort(sc, 0x06, 0x834e);
8300                         MP_WritePhyUshort(sc, 0x06, 0x7803);
8301                         MP_WritePhyUshort(sc, 0x06, 0x9e0f);
8302                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8303                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
8304                         MP_WritePhyUshort(sc, 0x06, 0x019e);
8305                         MP_WritePhyUshort(sc, 0x06, 0x05ae);
8306                         MP_WritePhyUshort(sc, 0x06, 0x0caf);
8307                         MP_WritePhyUshort(sc, 0x06, 0x81f8);
8308                         MP_WritePhyUshort(sc, 0x06, 0xaf81);
8309                         MP_WritePhyUshort(sc, 0x06, 0xa3af);
8310                         MP_WritePhyUshort(sc, 0x06, 0x81dc);
8311                         MP_WritePhyUshort(sc, 0x06, 0xaf82);
8312                         MP_WritePhyUshort(sc, 0x06, 0x13ee);
8313                         MP_WritePhyUshort(sc, 0x06, 0x8348);
8314                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
8315                         MP_WritePhyUshort(sc, 0x06, 0x8349);
8316                         MP_WritePhyUshort(sc, 0x06, 0x00e0);
8317                         MP_WritePhyUshort(sc, 0x06, 0x8351);
8318                         MP_WritePhyUshort(sc, 0x06, 0x10e4);
8319                         MP_WritePhyUshort(sc, 0x06, 0x8351);
8320                         MP_WritePhyUshort(sc, 0x06, 0x5801);
8321                         MP_WritePhyUshort(sc, 0x06, 0x9fea);
8322                         MP_WritePhyUshort(sc, 0x06, 0xd000);
8323                         MP_WritePhyUshort(sc, 0x06, 0xd180);
8324                         MP_WritePhyUshort(sc, 0x06, 0x1f66);
8325                         MP_WritePhyUshort(sc, 0x06, 0xe2f8);
8326                         MP_WritePhyUshort(sc, 0x06, 0xeae3);
8327                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
8328                         MP_WritePhyUshort(sc, 0x06, 0x5af8);
8329                         MP_WritePhyUshort(sc, 0x06, 0x1e20);
8330                         MP_WritePhyUshort(sc, 0x06, 0xe6f8);
8331                         MP_WritePhyUshort(sc, 0x06, 0xeae5);
8332                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
8333                         MP_WritePhyUshort(sc, 0x06, 0xd302);
8334                         MP_WritePhyUshort(sc, 0x06, 0xb3fe);
8335                         MP_WritePhyUshort(sc, 0x06, 0xe2f8);
8336                         MP_WritePhyUshort(sc, 0x06, 0x7cef);
8337                         MP_WritePhyUshort(sc, 0x06, 0x325b);
8338                         MP_WritePhyUshort(sc, 0x06, 0x80e3);
8339                         MP_WritePhyUshort(sc, 0x06, 0xf87d);
8340                         MP_WritePhyUshort(sc, 0x06, 0x9e03);
8341                         MP_WritePhyUshort(sc, 0x06, 0x7dff);
8342                         MP_WritePhyUshort(sc, 0x06, 0xff0d);
8343                         MP_WritePhyUshort(sc, 0x06, 0x581c);
8344                         MP_WritePhyUshort(sc, 0x06, 0x551a);
8345                         MP_WritePhyUshort(sc, 0x06, 0x6511);
8346                         MP_WritePhyUshort(sc, 0x06, 0xa190);
8347                         MP_WritePhyUshort(sc, 0x06, 0xd3e2);
8348                         MP_WritePhyUshort(sc, 0x06, 0x8348);
8349                         MP_WritePhyUshort(sc, 0x06, 0xe383);
8350                         MP_WritePhyUshort(sc, 0x06, 0x491b);
8351                         MP_WritePhyUshort(sc, 0x06, 0x56ab);
8352                         MP_WritePhyUshort(sc, 0x06, 0x08ef);
8353                         MP_WritePhyUshort(sc, 0x06, 0x56e6);
8354                         MP_WritePhyUshort(sc, 0x06, 0x8348);
8355                         MP_WritePhyUshort(sc, 0x06, 0xe783);
8356                         MP_WritePhyUshort(sc, 0x06, 0x4910);
8357                         MP_WritePhyUshort(sc, 0x06, 0xd180);
8358                         MP_WritePhyUshort(sc, 0x06, 0x1f66);
8359                         MP_WritePhyUshort(sc, 0x06, 0xa004);
8360                         MP_WritePhyUshort(sc, 0x06, 0xb9e2);
8361                         MP_WritePhyUshort(sc, 0x06, 0x8348);
8362                         MP_WritePhyUshort(sc, 0x06, 0xe383);
8363                         MP_WritePhyUshort(sc, 0x06, 0x49ef);
8364                         MP_WritePhyUshort(sc, 0x06, 0x65e2);
8365                         MP_WritePhyUshort(sc, 0x06, 0x834a);
8366                         MP_WritePhyUshort(sc, 0x06, 0xe383);
8367                         MP_WritePhyUshort(sc, 0x06, 0x4b1b);
8368                         MP_WritePhyUshort(sc, 0x06, 0x56aa);
8369                         MP_WritePhyUshort(sc, 0x06, 0x0eef);
8370                         MP_WritePhyUshort(sc, 0x06, 0x56e6);
8371                         MP_WritePhyUshort(sc, 0x06, 0x834a);
8372                         MP_WritePhyUshort(sc, 0x06, 0xe783);
8373                         MP_WritePhyUshort(sc, 0x06, 0x4be2);
8374                         MP_WritePhyUshort(sc, 0x06, 0x834d);
8375                         MP_WritePhyUshort(sc, 0x06, 0xe683);
8376                         MP_WritePhyUshort(sc, 0x06, 0x4ce0);
8377                         MP_WritePhyUshort(sc, 0x06, 0x834d);
8378                         MP_WritePhyUshort(sc, 0x06, 0xa000);
8379                         MP_WritePhyUshort(sc, 0x06, 0x0caf);
8380                         MP_WritePhyUshort(sc, 0x06, 0x81dc);
8381                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8382                         MP_WritePhyUshort(sc, 0x06, 0x4d10);
8383                         MP_WritePhyUshort(sc, 0x06, 0xe483);
8384                         MP_WritePhyUshort(sc, 0x06, 0x4dae);
8385                         MP_WritePhyUshort(sc, 0x06, 0x0480);
8386                         MP_WritePhyUshort(sc, 0x06, 0xe483);
8387                         MP_WritePhyUshort(sc, 0x06, 0x4de0);
8388                         MP_WritePhyUshort(sc, 0x06, 0x834e);
8389                         MP_WritePhyUshort(sc, 0x06, 0x7803);
8390                         MP_WritePhyUshort(sc, 0x06, 0x9e0b);
8391                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8392                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
8393                         MP_WritePhyUshort(sc, 0x06, 0x049e);
8394                         MP_WritePhyUshort(sc, 0x06, 0x04ee);
8395                         MP_WritePhyUshort(sc, 0x06, 0x834e);
8396                         MP_WritePhyUshort(sc, 0x06, 0x02e0);
8397                         MP_WritePhyUshort(sc, 0x06, 0x8332);
8398                         MP_WritePhyUshort(sc, 0x06, 0xe183);
8399                         MP_WritePhyUshort(sc, 0x06, 0x3359);
8400                         MP_WritePhyUshort(sc, 0x06, 0x0fe2);
8401                         MP_WritePhyUshort(sc, 0x06, 0x834d);
8402                         MP_WritePhyUshort(sc, 0x06, 0x0c24);
8403                         MP_WritePhyUshort(sc, 0x06, 0x5af0);
8404                         MP_WritePhyUshort(sc, 0x06, 0x1e12);
8405                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
8406                         MP_WritePhyUshort(sc, 0x06, 0x8ce5);
8407                         MP_WritePhyUshort(sc, 0x06, 0xf88d);
8408                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8409                         MP_WritePhyUshort(sc, 0x06, 0x30e1);
8410                         MP_WritePhyUshort(sc, 0x06, 0x8331);
8411                         MP_WritePhyUshort(sc, 0x06, 0x6801);
8412                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
8413                         MP_WritePhyUshort(sc, 0x06, 0x8ae5);
8414                         MP_WritePhyUshort(sc, 0x06, 0xf88b);
8415                         MP_WritePhyUshort(sc, 0x06, 0xae37);
8416                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8417                         MP_WritePhyUshort(sc, 0x06, 0x4e03);
8418                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8419                         MP_WritePhyUshort(sc, 0x06, 0x4ce1);
8420                         MP_WritePhyUshort(sc, 0x06, 0x834d);
8421                         MP_WritePhyUshort(sc, 0x06, 0x1b01);
8422                         MP_WritePhyUshort(sc, 0x06, 0x9e04);
8423                         MP_WritePhyUshort(sc, 0x06, 0xaaa1);
8424                         MP_WritePhyUshort(sc, 0x06, 0xaea8);
8425                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8426                         MP_WritePhyUshort(sc, 0x06, 0x4e04);
8427                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8428                         MP_WritePhyUshort(sc, 0x06, 0x4f00);
8429                         MP_WritePhyUshort(sc, 0x06, 0xaeab);
8430                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8431                         MP_WritePhyUshort(sc, 0x06, 0x4f78);
8432                         MP_WritePhyUshort(sc, 0x06, 0x039f);
8433                         MP_WritePhyUshort(sc, 0x06, 0x14ee);
8434                         MP_WritePhyUshort(sc, 0x06, 0x834e);
8435                         MP_WritePhyUshort(sc, 0x06, 0x05d2);
8436                         MP_WritePhyUshort(sc, 0x06, 0x40d6);
8437                         MP_WritePhyUshort(sc, 0x06, 0x5554);
8438                         MP_WritePhyUshort(sc, 0x06, 0x0282);
8439                         MP_WritePhyUshort(sc, 0x06, 0x17d2);
8440                         MP_WritePhyUshort(sc, 0x06, 0xa0d6);
8441                         MP_WritePhyUshort(sc, 0x06, 0xba00);
8442                         MP_WritePhyUshort(sc, 0x06, 0x0282);
8443                         MP_WritePhyUshort(sc, 0x06, 0x17fe);
8444                         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
8445                         MP_WritePhyUshort(sc, 0x06, 0x05f8);
8446                         MP_WritePhyUshort(sc, 0x06, 0xe0f8);
8447                         MP_WritePhyUshort(sc, 0x06, 0x60e1);
8448                         MP_WritePhyUshort(sc, 0x06, 0xf861);
8449                         MP_WritePhyUshort(sc, 0x06, 0x6802);
8450                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
8451                         MP_WritePhyUshort(sc, 0x06, 0x60e5);
8452                         MP_WritePhyUshort(sc, 0x06, 0xf861);
8453                         MP_WritePhyUshort(sc, 0x06, 0xe0f8);
8454                         MP_WritePhyUshort(sc, 0x06, 0x48e1);
8455                         MP_WritePhyUshort(sc, 0x06, 0xf849);
8456                         MP_WritePhyUshort(sc, 0x06, 0x580f);
8457                         MP_WritePhyUshort(sc, 0x06, 0x1e02);
8458                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
8459                         MP_WritePhyUshort(sc, 0x06, 0x48e5);
8460                         MP_WritePhyUshort(sc, 0x06, 0xf849);
8461                         MP_WritePhyUshort(sc, 0x06, 0xd000);
8462                         MP_WritePhyUshort(sc, 0x06, 0x0282);
8463                         MP_WritePhyUshort(sc, 0x06, 0x5bbf);
8464                         MP_WritePhyUshort(sc, 0x06, 0x8350);
8465                         MP_WritePhyUshort(sc, 0x06, 0xef46);
8466                         MP_WritePhyUshort(sc, 0x06, 0xdc19);
8467                         MP_WritePhyUshort(sc, 0x06, 0xddd0);
8468                         MP_WritePhyUshort(sc, 0x06, 0x0102);
8469                         MP_WritePhyUshort(sc, 0x06, 0x825b);
8470                         MP_WritePhyUshort(sc, 0x06, 0x0282);
8471                         MP_WritePhyUshort(sc, 0x06, 0x77e0);
8472                         MP_WritePhyUshort(sc, 0x06, 0xf860);
8473                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
8474                         MP_WritePhyUshort(sc, 0x06, 0x6158);
8475                         MP_WritePhyUshort(sc, 0x06, 0xfde4);
8476                         MP_WritePhyUshort(sc, 0x06, 0xf860);
8477                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
8478                         MP_WritePhyUshort(sc, 0x06, 0x61fc);
8479                         MP_WritePhyUshort(sc, 0x06, 0x04f9);
8480                         MP_WritePhyUshort(sc, 0x06, 0xfafb);
8481                         MP_WritePhyUshort(sc, 0x06, 0xc6bf);
8482                         MP_WritePhyUshort(sc, 0x06, 0xf840);
8483                         MP_WritePhyUshort(sc, 0x06, 0xbe83);
8484                         MP_WritePhyUshort(sc, 0x06, 0x50a0);
8485                         MP_WritePhyUshort(sc, 0x06, 0x0101);
8486                         MP_WritePhyUshort(sc, 0x06, 0x071b);
8487                         MP_WritePhyUshort(sc, 0x06, 0x89cf);
8488                         MP_WritePhyUshort(sc, 0x06, 0xd208);
8489                         MP_WritePhyUshort(sc, 0x06, 0xebdb);
8490                         MP_WritePhyUshort(sc, 0x06, 0x19b2);
8491                         MP_WritePhyUshort(sc, 0x06, 0xfbff);
8492                         MP_WritePhyUshort(sc, 0x06, 0xfefd);
8493                         MP_WritePhyUshort(sc, 0x06, 0x04f8);
8494                         MP_WritePhyUshort(sc, 0x06, 0xe0f8);
8495                         MP_WritePhyUshort(sc, 0x06, 0x48e1);
8496                         MP_WritePhyUshort(sc, 0x06, 0xf849);
8497                         MP_WritePhyUshort(sc, 0x06, 0x6808);
8498                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
8499                         MP_WritePhyUshort(sc, 0x06, 0x48e5);
8500                         MP_WritePhyUshort(sc, 0x06, 0xf849);
8501                         MP_WritePhyUshort(sc, 0x06, 0x58f7);
8502                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
8503                         MP_WritePhyUshort(sc, 0x06, 0x48e5);
8504                         MP_WritePhyUshort(sc, 0x06, 0xf849);
8505                         MP_WritePhyUshort(sc, 0x06, 0xfc04);
8506                         MP_WritePhyUshort(sc, 0x06, 0x4d20);
8507                         MP_WritePhyUshort(sc, 0x06, 0x0002);
8508                         MP_WritePhyUshort(sc, 0x06, 0x4e22);
8509                         MP_WritePhyUshort(sc, 0x06, 0x0002);
8510                         MP_WritePhyUshort(sc, 0x06, 0x4ddf);
8511                         MP_WritePhyUshort(sc, 0x06, 0xff01);
8512                         MP_WritePhyUshort(sc, 0x06, 0x4edd);
8513                         MP_WritePhyUshort(sc, 0x06, 0xff01);
8514                         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
8515                         MP_WritePhyUshort(sc, 0x06, 0xfbef);
8516                         MP_WritePhyUshort(sc, 0x06, 0x79bf);
8517                         MP_WritePhyUshort(sc, 0x06, 0xf822);
8518                         MP_WritePhyUshort(sc, 0x06, 0xd819);
8519                         MP_WritePhyUshort(sc, 0x06, 0xd958);
8520                         MP_WritePhyUshort(sc, 0x06, 0x849f);
8521                         MP_WritePhyUshort(sc, 0x06, 0x09bf);
8522                         MP_WritePhyUshort(sc, 0x06, 0x82be);
8523                         MP_WritePhyUshort(sc, 0x06, 0xd682);
8524                         MP_WritePhyUshort(sc, 0x06, 0xc602);
8525                         MP_WritePhyUshort(sc, 0x06, 0x014f);
8526                         MP_WritePhyUshort(sc, 0x06, 0xef97);
8527                         MP_WritePhyUshort(sc, 0x06, 0xfffe);
8528                         MP_WritePhyUshort(sc, 0x06, 0xfc05);
8529                         MP_WritePhyUshort(sc, 0x06, 0x17ff);
8530                         MP_WritePhyUshort(sc, 0x06, 0xfe01);
8531                         MP_WritePhyUshort(sc, 0x06, 0x1700);
8532                         MP_WritePhyUshort(sc, 0x06, 0x0102);
8533                         MP_WritePhyUshort(sc, 0x05, 0x83d8);
8534                         MP_WritePhyUshort(sc, 0x06, 0x8051);
8535                         MP_WritePhyUshort(sc, 0x05, 0x83d6);
8536                         MP_WritePhyUshort(sc, 0x06, 0x82a0);
8537                         MP_WritePhyUshort(sc, 0x05, 0x83d4);
8538                         MP_WritePhyUshort(sc, 0x06, 0x8000);
8539                         MP_WritePhyUshort(sc, 0x02, 0x2010);
8540                         MP_WritePhyUshort(sc, 0x03, 0xdc00);
8541                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
8542                         MP_WritePhyUshort(sc, 0x0b, 0x0600);
8543                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
8544                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
8545                         MP_WritePhyUshort(sc, 0x06, 0x00fc);
8546                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
8547                 }
8548
8549                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8550                 MP_WritePhyUshort(sc, 0x0D, 0xF880);
8551                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
8552         } else if (sc->re_type == MACFG_32) {
8553                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
8554                 MP_WritePhyUshort(sc, 0x06, 0x4064);
8555                 MP_WritePhyUshort(sc, 0x07, 0x2863);
8556                 MP_WritePhyUshort(sc, 0x08, 0x059C);
8557                 MP_WritePhyUshort(sc, 0x09, 0x26B4);
8558                 MP_WritePhyUshort(sc, 0x0A, 0x6A19);
8559                 MP_WritePhyUshort(sc, 0x0B, 0xBCC0);
8560                 MP_WritePhyUshort(sc, 0x10, 0xF06D);
8561                 MP_WritePhyUshort(sc, 0x14, 0x7F68);
8562                 MP_WritePhyUshort(sc, 0x18, 0x7FD9);
8563                 MP_WritePhyUshort(sc, 0x1C, 0xF0FF);
8564                 MP_WritePhyUshort(sc, 0x1D, 0x3D9C);
8565                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
8566                 MP_WritePhyUshort(sc, 0x12, 0xF49F);
8567                 MP_WritePhyUshort(sc, 0x13, 0x070B);
8568                 MP_WritePhyUshort(sc, 0x1A, 0x05AD);
8569                 MP_WritePhyUshort(sc, 0x14, 0x94C0);
8570
8571                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8572                 MP_WritePhyUshort(sc, 0x06, 0x5571);
8573
8574                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8575                 MP_WritePhyUshort(sc, 0x05, 0x2642);
8576
8577                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8578                 MP_WritePhyUshort(sc, 0x02, 0xC107);
8579                 MP_WritePhyUshort(sc, 0x03, 0x1002);
8580
8581                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
8582                 MP_WritePhyUshort(sc, 0x16, 0x0CC0);
8583
8584                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8585                 MP_WritePhyUshort(sc, 0x0F, 0x0017);
8586
8587                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
8588                 MP_WritePhyUshort(sc, 0x05, 0x8200);
8589                 MP_WritePhyUshort(sc, 0x06, 0xF8F9);
8590                 MP_WritePhyUshort(sc, 0x06, 0xFAEF);
8591                 MP_WritePhyUshort(sc, 0x06, 0x59EE);
8592                 MP_WritePhyUshort(sc, 0x06, 0xF8EA);
8593                 MP_WritePhyUshort(sc, 0x06, 0x00EE);
8594                 MP_WritePhyUshort(sc, 0x06, 0xF8EB);
8595                 MP_WritePhyUshort(sc, 0x06, 0x00E0);
8596                 MP_WritePhyUshort(sc, 0x06, 0xF87C);
8597                 MP_WritePhyUshort(sc, 0x06, 0xE1F8);
8598                 MP_WritePhyUshort(sc, 0x06, 0x7D59);
8599                 MP_WritePhyUshort(sc, 0x06, 0x0FEF);
8600                 MP_WritePhyUshort(sc, 0x06, 0x0139);
8601                 MP_WritePhyUshort(sc, 0x06, 0x029E);
8602                 MP_WritePhyUshort(sc, 0x06, 0x06EF);
8603                 MP_WritePhyUshort(sc, 0x06, 0x1039);
8604                 MP_WritePhyUshort(sc, 0x06, 0x089F);
8605                 MP_WritePhyUshort(sc, 0x06, 0x2AEE);
8606                 MP_WritePhyUshort(sc, 0x06, 0xF8EA);
8607                 MP_WritePhyUshort(sc, 0x06, 0x00EE);
8608                 MP_WritePhyUshort(sc, 0x06, 0xF8EB);
8609                 MP_WritePhyUshort(sc, 0x06, 0x01E0);
8610                 MP_WritePhyUshort(sc, 0x06, 0xF87C);
8611                 MP_WritePhyUshort(sc, 0x06, 0xE1F8);
8612                 MP_WritePhyUshort(sc, 0x06, 0x7D58);
8613                 MP_WritePhyUshort(sc, 0x06, 0x409E);
8614                 MP_WritePhyUshort(sc, 0x06, 0x0F39);
8615                 MP_WritePhyUshort(sc, 0x06, 0x46AA);
8616                 MP_WritePhyUshort(sc, 0x06, 0x0BBF);
8617                 MP_WritePhyUshort(sc, 0x06, 0x8251);
8618                 MP_WritePhyUshort(sc, 0x06, 0xD682);
8619                 MP_WritePhyUshort(sc, 0x06, 0x5902);
8620                 MP_WritePhyUshort(sc, 0x06, 0x014F);
8621                 MP_WritePhyUshort(sc, 0x06, 0xAE09);
8622                 MP_WritePhyUshort(sc, 0x06, 0xBF82);
8623                 MP_WritePhyUshort(sc, 0x06, 0x59D6);
8624                 MP_WritePhyUshort(sc, 0x06, 0x8261);
8625                 MP_WritePhyUshort(sc, 0x06, 0x0201);
8626                 MP_WritePhyUshort(sc, 0x06, 0x4FEF);
8627                 MP_WritePhyUshort(sc, 0x06, 0x95FE);
8628                 MP_WritePhyUshort(sc, 0x06, 0xFDFC);
8629                 MP_WritePhyUshort(sc, 0x06, 0x054D);
8630                 MP_WritePhyUshort(sc, 0x06, 0x2000);
8631                 MP_WritePhyUshort(sc, 0x06, 0x024E);
8632                 MP_WritePhyUshort(sc, 0x06, 0x2200);
8633                 MP_WritePhyUshort(sc, 0x06, 0x024D);
8634                 MP_WritePhyUshort(sc, 0x06, 0xDFFF);
8635                 MP_WritePhyUshort(sc, 0x06, 0x014E);
8636                 MP_WritePhyUshort(sc, 0x06, 0xDDFF);
8637                 MP_WritePhyUshort(sc, 0x06, 0x0100);
8638                 MP_WritePhyUshort(sc, 0x02, 0x6010);
8639                 MP_WritePhyUshort(sc, 0x05, 0xFFF6);
8640                 MP_WritePhyUshort(sc, 0x06, 0x00EC);
8641                 MP_WritePhyUshort(sc, 0x05, 0x83D4);
8642                 MP_WritePhyUshort(sc, 0x06, 0x8200);
8643
8644         } else if (sc->re_type == MACFG_33) {
8645                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
8646                 MP_WritePhyUshort(sc, 0x06, 0x4064);
8647                 MP_WritePhyUshort(sc, 0x07, 0x2863);
8648                 MP_WritePhyUshort(sc, 0x08, 0x059C);
8649                 MP_WritePhyUshort(sc, 0x09, 0x26B4);
8650                 MP_WritePhyUshort(sc, 0x0A, 0x6A19);
8651                 MP_WritePhyUshort(sc, 0x0B, 0xDCC8);
8652                 MP_WritePhyUshort(sc, 0x10, 0xF06D);
8653                 MP_WritePhyUshort(sc, 0x14, 0x7F68);
8654                 MP_WritePhyUshort(sc, 0x18, 0x7FD9);
8655                 MP_WritePhyUshort(sc, 0x1C, 0xF0FF);
8656                 MP_WritePhyUshort(sc, 0x1D, 0x3D9C);
8657                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
8658                 MP_WritePhyUshort(sc, 0x12, 0xF49F);
8659                 MP_WritePhyUshort(sc, 0x13, 0x070B);
8660                 MP_WritePhyUshort(sc, 0x1A, 0x05AD);
8661                 MP_WritePhyUshort(sc, 0x14, 0x94C0);
8662
8663                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8664                 MP_WritePhyUshort(sc, 0x06, 0x5561);
8665                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
8666                 MP_WritePhyUshort(sc, 0x05, 0x8332);
8667                 MP_WritePhyUshort(sc, 0x06, 0x5561);
8668
8669                 if (MP_ReadEfuse(sc, 0x01) == 0xb1) {
8670                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
8671                         MP_WritePhyUshort(sc, 0x05, 0x669A);
8672                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
8673                         MP_WritePhyUshort(sc, 0x05, 0x8330);
8674                         MP_WritePhyUshort(sc, 0x06, 0x669A);
8675
8676                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
8677                         Data = MP_ReadPhyUshort(sc, 0x0D);
8678                         if ((Data & 0x00FF) != 0x006C) {
8679                                 Data &= 0xFF00;
8680                                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8681                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0065);
8682                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0066);
8683                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0067);
8684                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0068);
8685                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x0069);
8686                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006A);
8687                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006B);
8688                                 MP_WritePhyUshort(sc, 0x0D, Data | 0x006C);
8689                         }
8690                 } else {
8691                         MP_WritePhyUshort(sc, 0x1F, 0x0002);
8692                         MP_WritePhyUshort(sc, 0x05, 0x2642);
8693                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
8694                         MP_WritePhyUshort(sc, 0x05, 0x8330);
8695                         MP_WritePhyUshort(sc, 0x06, 0x2642);
8696                 }
8697
8698                 if (MP_ReadEfuse(sc, 0x30) == 0x98) {
8699                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
8700                         MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) & ~0x02);
8701                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
8702                         MP_WritePhyUshort(sc, 0x01, MP_ReadPhyUshort(sc, 0x01) | 0x200);
8703                 } else if (MP_ReadEfuse(sc, 0x30) == 0x90) {
8704                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
8705                         MP_WritePhyUshort(sc, 0x01, MP_ReadPhyUshort(sc, 0x01) & ~0x200);
8706                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
8707                         MP_WritePhyUshort(sc, 0x16, 0x5101);
8708                 }
8709
8710                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8711                 Data = MP_ReadPhyUshort(sc, 0x02);
8712                 Data &= ~0x600;
8713                 Data |= 0x100;
8714                 MP_WritePhyUshort(sc, 0x02, Data);
8715                 Data = MP_ReadPhyUshort(sc, 0x03);
8716                 Data &= ~0xE000;
8717                 MP_WritePhyUshort(sc, 0x03, Data);
8718
8719                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
8720                 MP_WritePhyUshort(sc, 0x17, 0x0CC0);
8721
8722                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
8723                 Data = MP_ReadPhyUshort(sc, 0x0F);
8724                 Data |= 0x17;
8725                 MP_WritePhyUshort(sc, 0x0F, Data);
8726
8727                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
8728                 MP_WritePhyUshort(sc, 0x05, 0x001B);
8729                 if (MP_ReadPhyUshort(sc, 0x06) == 0xB300) {
8730                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
8731                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
8732                         MP_WritePhyUshort(sc, 0x06, 0x0080);
8733                         MP_WritePhyUshort(sc, 0x05, 0x8000);
8734                         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
8735                         MP_WritePhyUshort(sc, 0x06, 0xfaee);
8736                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
8737                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
8738                         MP_WritePhyUshort(sc, 0x06, 0xf8eb);
8739                         MP_WritePhyUshort(sc, 0x06, 0x00e2);
8740                         MP_WritePhyUshort(sc, 0x06, 0xf87c);
8741                         MP_WritePhyUshort(sc, 0x06, 0xe3f8);
8742                         MP_WritePhyUshort(sc, 0x06, 0x7da5);
8743                         MP_WritePhyUshort(sc, 0x06, 0x1111);
8744                         MP_WritePhyUshort(sc, 0x06, 0x12d2);
8745                         MP_WritePhyUshort(sc, 0x06, 0x40d6);
8746                         MP_WritePhyUshort(sc, 0x06, 0x4444);
8747                         MP_WritePhyUshort(sc, 0x06, 0x0281);
8748                         MP_WritePhyUshort(sc, 0x06, 0xc6d2);
8749                         MP_WritePhyUshort(sc, 0x06, 0xa0d6);
8750                         MP_WritePhyUshort(sc, 0x06, 0xaaaa);
8751                         MP_WritePhyUshort(sc, 0x06, 0x0281);
8752                         MP_WritePhyUshort(sc, 0x06, 0xc6ae);
8753                         MP_WritePhyUshort(sc, 0x06, 0x0fa5);
8754                         MP_WritePhyUshort(sc, 0x06, 0x4444);
8755                         MP_WritePhyUshort(sc, 0x06, 0x02ae);
8756                         MP_WritePhyUshort(sc, 0x06, 0x4da5);
8757                         MP_WritePhyUshort(sc, 0x06, 0xaaaa);
8758                         MP_WritePhyUshort(sc, 0x06, 0x02ae);
8759                         MP_WritePhyUshort(sc, 0x06, 0x47af);
8760                         MP_WritePhyUshort(sc, 0x06, 0x81c2);
8761                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8762                         MP_WritePhyUshort(sc, 0x06, 0x4e00);
8763                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8764                         MP_WritePhyUshort(sc, 0x06, 0x4d0f);
8765                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8766                         MP_WritePhyUshort(sc, 0x06, 0x4c0f);
8767                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8768                         MP_WritePhyUshort(sc, 0x06, 0x4f00);
8769                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8770                         MP_WritePhyUshort(sc, 0x06, 0x5100);
8771                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8772                         MP_WritePhyUshort(sc, 0x06, 0x4aff);
8773                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8774                         MP_WritePhyUshort(sc, 0x06, 0x4bff);
8775                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8776                         MP_WritePhyUshort(sc, 0x06, 0x30e1);
8777                         MP_WritePhyUshort(sc, 0x06, 0x8331);
8778                         MP_WritePhyUshort(sc, 0x06, 0x58fe);
8779                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
8780                         MP_WritePhyUshort(sc, 0x06, 0x8ae5);
8781                         MP_WritePhyUshort(sc, 0x06, 0xf88b);
8782                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8783                         MP_WritePhyUshort(sc, 0x06, 0x32e1);
8784                         MP_WritePhyUshort(sc, 0x06, 0x8333);
8785                         MP_WritePhyUshort(sc, 0x06, 0x590f);
8786                         MP_WritePhyUshort(sc, 0x06, 0xe283);
8787                         MP_WritePhyUshort(sc, 0x06, 0x4d0c);
8788                         MP_WritePhyUshort(sc, 0x06, 0x245a);
8789                         MP_WritePhyUshort(sc, 0x06, 0xf01e);
8790                         MP_WritePhyUshort(sc, 0x06, 0x12e4);
8791                         MP_WritePhyUshort(sc, 0x06, 0xf88c);
8792                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
8793                         MP_WritePhyUshort(sc, 0x06, 0x8daf);
8794                         MP_WritePhyUshort(sc, 0x06, 0x81c2);
8795                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8796                         MP_WritePhyUshort(sc, 0x06, 0x4f10);
8797                         MP_WritePhyUshort(sc, 0x06, 0xe483);
8798                         MP_WritePhyUshort(sc, 0x06, 0x4fe0);
8799                         MP_WritePhyUshort(sc, 0x06, 0x834e);
8800                         MP_WritePhyUshort(sc, 0x06, 0x7800);
8801                         MP_WritePhyUshort(sc, 0x06, 0x9f0a);
8802                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8803                         MP_WritePhyUshort(sc, 0x06, 0x4fa0);
8804                         MP_WritePhyUshort(sc, 0x06, 0x10a5);
8805                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8806                         MP_WritePhyUshort(sc, 0x06, 0x4e01);
8807                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8808                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
8809                         MP_WritePhyUshort(sc, 0x06, 0x059e);
8810                         MP_WritePhyUshort(sc, 0x06, 0x9ae0);
8811                         MP_WritePhyUshort(sc, 0x06, 0x834e);
8812                         MP_WritePhyUshort(sc, 0x06, 0x7804);
8813                         MP_WritePhyUshort(sc, 0x06, 0x9e10);
8814                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8815                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
8816                         MP_WritePhyUshort(sc, 0x06, 0x039e);
8817                         MP_WritePhyUshort(sc, 0x06, 0x0fe0);
8818                         MP_WritePhyUshort(sc, 0x06, 0x834e);
8819                         MP_WritePhyUshort(sc, 0x06, 0x7801);
8820                         MP_WritePhyUshort(sc, 0x06, 0x9e05);
8821                         MP_WritePhyUshort(sc, 0x06, 0xae0c);
8822                         MP_WritePhyUshort(sc, 0x06, 0xaf81);
8823                         MP_WritePhyUshort(sc, 0x06, 0xa7af);
8824                         MP_WritePhyUshort(sc, 0x06, 0x8152);
8825                         MP_WritePhyUshort(sc, 0x06, 0xaf81);
8826                         MP_WritePhyUshort(sc, 0x06, 0x8baf);
8827                         MP_WritePhyUshort(sc, 0x06, 0x81c2);
8828                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8829                         MP_WritePhyUshort(sc, 0x06, 0x4800);
8830                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8831                         MP_WritePhyUshort(sc, 0x06, 0x4900);
8832                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8833                         MP_WritePhyUshort(sc, 0x06, 0x5110);
8834                         MP_WritePhyUshort(sc, 0x06, 0xe483);
8835                         MP_WritePhyUshort(sc, 0x06, 0x5158);
8836                         MP_WritePhyUshort(sc, 0x06, 0x019f);
8837                         MP_WritePhyUshort(sc, 0x06, 0xead0);
8838                         MP_WritePhyUshort(sc, 0x06, 0x00d1);
8839                         MP_WritePhyUshort(sc, 0x06, 0x801f);
8840                         MP_WritePhyUshort(sc, 0x06, 0x66e2);
8841                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
8842                         MP_WritePhyUshort(sc, 0x06, 0xe3f8);
8843                         MP_WritePhyUshort(sc, 0x06, 0xeb5a);
8844                         MP_WritePhyUshort(sc, 0x06, 0xf81e);
8845                         MP_WritePhyUshort(sc, 0x06, 0x20e6);
8846                         MP_WritePhyUshort(sc, 0x06, 0xf8ea);
8847                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
8848                         MP_WritePhyUshort(sc, 0x06, 0xebd3);
8849                         MP_WritePhyUshort(sc, 0x06, 0x02b3);
8850                         MP_WritePhyUshort(sc, 0x06, 0xfee2);
8851                         MP_WritePhyUshort(sc, 0x06, 0xf87c);
8852                         MP_WritePhyUshort(sc, 0x06, 0xef32);
8853                         MP_WritePhyUshort(sc, 0x06, 0x5b80);
8854                         MP_WritePhyUshort(sc, 0x06, 0xe3f8);
8855                         MP_WritePhyUshort(sc, 0x06, 0x7d9e);
8856                         MP_WritePhyUshort(sc, 0x06, 0x037d);
8857                         MP_WritePhyUshort(sc, 0x06, 0xffff);
8858                         MP_WritePhyUshort(sc, 0x06, 0x0d58);
8859                         MP_WritePhyUshort(sc, 0x06, 0x1c55);
8860                         MP_WritePhyUshort(sc, 0x06, 0x1a65);
8861                         MP_WritePhyUshort(sc, 0x06, 0x11a1);
8862                         MP_WritePhyUshort(sc, 0x06, 0x90d3);
8863                         MP_WritePhyUshort(sc, 0x06, 0xe283);
8864                         MP_WritePhyUshort(sc, 0x06, 0x48e3);
8865                         MP_WritePhyUshort(sc, 0x06, 0x8349);
8866                         MP_WritePhyUshort(sc, 0x06, 0x1b56);
8867                         MP_WritePhyUshort(sc, 0x06, 0xab08);
8868                         MP_WritePhyUshort(sc, 0x06, 0xef56);
8869                         MP_WritePhyUshort(sc, 0x06, 0xe683);
8870                         MP_WritePhyUshort(sc, 0x06, 0x48e7);
8871                         MP_WritePhyUshort(sc, 0x06, 0x8349);
8872                         MP_WritePhyUshort(sc, 0x06, 0x10d1);
8873                         MP_WritePhyUshort(sc, 0x06, 0x801f);
8874                         MP_WritePhyUshort(sc, 0x06, 0x66a0);
8875                         MP_WritePhyUshort(sc, 0x06, 0x04b9);
8876                         MP_WritePhyUshort(sc, 0x06, 0xe283);
8877                         MP_WritePhyUshort(sc, 0x06, 0x48e3);
8878                         MP_WritePhyUshort(sc, 0x06, 0x8349);
8879                         MP_WritePhyUshort(sc, 0x06, 0xef65);
8880                         MP_WritePhyUshort(sc, 0x06, 0xe283);
8881                         MP_WritePhyUshort(sc, 0x06, 0x4ae3);
8882                         MP_WritePhyUshort(sc, 0x06, 0x834b);
8883                         MP_WritePhyUshort(sc, 0x06, 0x1b56);
8884                         MP_WritePhyUshort(sc, 0x06, 0xaa0e);
8885                         MP_WritePhyUshort(sc, 0x06, 0xef56);
8886                         MP_WritePhyUshort(sc, 0x06, 0xe683);
8887                         MP_WritePhyUshort(sc, 0x06, 0x4ae7);
8888                         MP_WritePhyUshort(sc, 0x06, 0x834b);
8889                         MP_WritePhyUshort(sc, 0x06, 0xe283);
8890                         MP_WritePhyUshort(sc, 0x06, 0x4de6);
8891                         MP_WritePhyUshort(sc, 0x06, 0x834c);
8892                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8893                         MP_WritePhyUshort(sc, 0x06, 0x4da0);
8894                         MP_WritePhyUshort(sc, 0x06, 0x000c);
8895                         MP_WritePhyUshort(sc, 0x06, 0xaf81);
8896                         MP_WritePhyUshort(sc, 0x06, 0x8be0);
8897                         MP_WritePhyUshort(sc, 0x06, 0x834d);
8898                         MP_WritePhyUshort(sc, 0x06, 0x10e4);
8899                         MP_WritePhyUshort(sc, 0x06, 0x834d);
8900                         MP_WritePhyUshort(sc, 0x06, 0xae04);
8901                         MP_WritePhyUshort(sc, 0x06, 0x80e4);
8902                         MP_WritePhyUshort(sc, 0x06, 0x834d);
8903                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8904                         MP_WritePhyUshort(sc, 0x06, 0x4e78);
8905                         MP_WritePhyUshort(sc, 0x06, 0x039e);
8906                         MP_WritePhyUshort(sc, 0x06, 0x0be0);
8907                         MP_WritePhyUshort(sc, 0x06, 0x834e);
8908                         MP_WritePhyUshort(sc, 0x06, 0x7804);
8909                         MP_WritePhyUshort(sc, 0x06, 0x9e04);
8910                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8911                         MP_WritePhyUshort(sc, 0x06, 0x4e02);
8912                         MP_WritePhyUshort(sc, 0x06, 0xe083);
8913                         MP_WritePhyUshort(sc, 0x06, 0x32e1);
8914                         MP_WritePhyUshort(sc, 0x06, 0x8333);
8915                         MP_WritePhyUshort(sc, 0x06, 0x590f);
8916                         MP_WritePhyUshort(sc, 0x06, 0xe283);
8917                         MP_WritePhyUshort(sc, 0x06, 0x4d0c);
8918                         MP_WritePhyUshort(sc, 0x06, 0x245a);
8919                         MP_WritePhyUshort(sc, 0x06, 0xf01e);
8920                         MP_WritePhyUshort(sc, 0x06, 0x12e4);
8921                         MP_WritePhyUshort(sc, 0x06, 0xf88c);
8922                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
8923                         MP_WritePhyUshort(sc, 0x06, 0x8de0);
8924                         MP_WritePhyUshort(sc, 0x06, 0x8330);
8925                         MP_WritePhyUshort(sc, 0x06, 0xe183);
8926                         MP_WritePhyUshort(sc, 0x06, 0x3168);
8927                         MP_WritePhyUshort(sc, 0x06, 0x01e4);
8928                         MP_WritePhyUshort(sc, 0x06, 0xf88a);
8929                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
8930                         MP_WritePhyUshort(sc, 0x06, 0x8bae);
8931                         MP_WritePhyUshort(sc, 0x06, 0x37ee);
8932                         MP_WritePhyUshort(sc, 0x06, 0x834e);
8933                         MP_WritePhyUshort(sc, 0x06, 0x03e0);
8934                         MP_WritePhyUshort(sc, 0x06, 0x834c);
8935                         MP_WritePhyUshort(sc, 0x06, 0xe183);
8936                         MP_WritePhyUshort(sc, 0x06, 0x4d1b);
8937                         MP_WritePhyUshort(sc, 0x06, 0x019e);
8938                         MP_WritePhyUshort(sc, 0x06, 0x04aa);
8939                         MP_WritePhyUshort(sc, 0x06, 0xa1ae);
8940                         MP_WritePhyUshort(sc, 0x06, 0xa8ee);
8941                         MP_WritePhyUshort(sc, 0x06, 0x834e);
8942                         MP_WritePhyUshort(sc, 0x06, 0x04ee);
8943                         MP_WritePhyUshort(sc, 0x06, 0x834f);
8944                         MP_WritePhyUshort(sc, 0x06, 0x00ae);
8945                         MP_WritePhyUshort(sc, 0x06, 0xabe0);
8946                         MP_WritePhyUshort(sc, 0x06, 0x834f);
8947                         MP_WritePhyUshort(sc, 0x06, 0x7803);
8948                         MP_WritePhyUshort(sc, 0x06, 0x9f14);
8949                         MP_WritePhyUshort(sc, 0x06, 0xee83);
8950                         MP_WritePhyUshort(sc, 0x06, 0x4e05);
8951                         MP_WritePhyUshort(sc, 0x06, 0xd240);
8952                         MP_WritePhyUshort(sc, 0x06, 0xd655);
8953                         MP_WritePhyUshort(sc, 0x06, 0x5402);
8954                         MP_WritePhyUshort(sc, 0x06, 0x81c6);
8955                         MP_WritePhyUshort(sc, 0x06, 0xd2a0);
8956                         MP_WritePhyUshort(sc, 0x06, 0xd6ba);
8957                         MP_WritePhyUshort(sc, 0x06, 0x0002);
8958                         MP_WritePhyUshort(sc, 0x06, 0x81c6);
8959                         MP_WritePhyUshort(sc, 0x06, 0xfefd);
8960                         MP_WritePhyUshort(sc, 0x06, 0xfc05);
8961                         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
8962                         MP_WritePhyUshort(sc, 0x06, 0xf860);
8963                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
8964                         MP_WritePhyUshort(sc, 0x06, 0x6168);
8965                         MP_WritePhyUshort(sc, 0x06, 0x02e4);
8966                         MP_WritePhyUshort(sc, 0x06, 0xf860);
8967                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
8968                         MP_WritePhyUshort(sc, 0x06, 0x61e0);
8969                         MP_WritePhyUshort(sc, 0x06, 0xf848);
8970                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
8971                         MP_WritePhyUshort(sc, 0x06, 0x4958);
8972                         MP_WritePhyUshort(sc, 0x06, 0x0f1e);
8973                         MP_WritePhyUshort(sc, 0x06, 0x02e4);
8974                         MP_WritePhyUshort(sc, 0x06, 0xf848);
8975                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
8976                         MP_WritePhyUshort(sc, 0x06, 0x49d0);
8977                         MP_WritePhyUshort(sc, 0x06, 0x0002);
8978                         MP_WritePhyUshort(sc, 0x06, 0x820a);
8979                         MP_WritePhyUshort(sc, 0x06, 0xbf83);
8980                         MP_WritePhyUshort(sc, 0x06, 0x50ef);
8981                         MP_WritePhyUshort(sc, 0x06, 0x46dc);
8982                         MP_WritePhyUshort(sc, 0x06, 0x19dd);
8983                         MP_WritePhyUshort(sc, 0x06, 0xd001);
8984                         MP_WritePhyUshort(sc, 0x06, 0x0282);
8985                         MP_WritePhyUshort(sc, 0x06, 0x0a02);
8986                         MP_WritePhyUshort(sc, 0x06, 0x8226);
8987                         MP_WritePhyUshort(sc, 0x06, 0xe0f8);
8988                         MP_WritePhyUshort(sc, 0x06, 0x60e1);
8989                         MP_WritePhyUshort(sc, 0x06, 0xf861);
8990                         MP_WritePhyUshort(sc, 0x06, 0x58fd);
8991                         MP_WritePhyUshort(sc, 0x06, 0xe4f8);
8992                         MP_WritePhyUshort(sc, 0x06, 0x60e5);
8993                         MP_WritePhyUshort(sc, 0x06, 0xf861);
8994                         MP_WritePhyUshort(sc, 0x06, 0xfc04);
8995                         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
8996                         MP_WritePhyUshort(sc, 0x06, 0xfbc6);
8997                         MP_WritePhyUshort(sc, 0x06, 0xbff8);
8998                         MP_WritePhyUshort(sc, 0x06, 0x40be);
8999                         MP_WritePhyUshort(sc, 0x06, 0x8350);
9000                         MP_WritePhyUshort(sc, 0x06, 0xa001);
9001                         MP_WritePhyUshort(sc, 0x06, 0x0107);
9002                         MP_WritePhyUshort(sc, 0x06, 0x1b89);
9003                         MP_WritePhyUshort(sc, 0x06, 0xcfd2);
9004                         MP_WritePhyUshort(sc, 0x06, 0x08eb);
9005                         MP_WritePhyUshort(sc, 0x06, 0xdb19);
9006                         MP_WritePhyUshort(sc, 0x06, 0xb2fb);
9007                         MP_WritePhyUshort(sc, 0x06, 0xfffe);
9008                         MP_WritePhyUshort(sc, 0x06, 0xfd04);
9009                         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
9010                         MP_WritePhyUshort(sc, 0x06, 0xf848);
9011                         MP_WritePhyUshort(sc, 0x06, 0xe1f8);
9012                         MP_WritePhyUshort(sc, 0x06, 0x4968);
9013                         MP_WritePhyUshort(sc, 0x06, 0x08e4);
9014                         MP_WritePhyUshort(sc, 0x06, 0xf848);
9015                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
9016                         MP_WritePhyUshort(sc, 0x06, 0x4958);
9017                         MP_WritePhyUshort(sc, 0x06, 0xf7e4);
9018                         MP_WritePhyUshort(sc, 0x06, 0xf848);
9019                         MP_WritePhyUshort(sc, 0x06, 0xe5f8);
9020                         MP_WritePhyUshort(sc, 0x06, 0x49fc);
9021                         MP_WritePhyUshort(sc, 0x06, 0x044d);
9022                         MP_WritePhyUshort(sc, 0x06, 0x2000);
9023                         MP_WritePhyUshort(sc, 0x06, 0x024e);
9024                         MP_WritePhyUshort(sc, 0x06, 0x2200);
9025                         MP_WritePhyUshort(sc, 0x06, 0x024d);
9026                         MP_WritePhyUshort(sc, 0x06, 0xdfff);
9027                         MP_WritePhyUshort(sc, 0x06, 0x014e);
9028                         MP_WritePhyUshort(sc, 0x06, 0xddff);
9029                         MP_WritePhyUshort(sc, 0x06, 0x01f8);
9030                         MP_WritePhyUshort(sc, 0x06, 0xfafb);
9031                         MP_WritePhyUshort(sc, 0x06, 0xef79);
9032                         MP_WritePhyUshort(sc, 0x06, 0xbff8);
9033                         MP_WritePhyUshort(sc, 0x06, 0x22d8);
9034                         MP_WritePhyUshort(sc, 0x06, 0x19d9);
9035                         MP_WritePhyUshort(sc, 0x06, 0x5884);
9036                         MP_WritePhyUshort(sc, 0x06, 0x9f09);
9037                         MP_WritePhyUshort(sc, 0x06, 0xbf82);
9038                         MP_WritePhyUshort(sc, 0x06, 0x6dd6);
9039                         MP_WritePhyUshort(sc, 0x06, 0x8275);
9040                         MP_WritePhyUshort(sc, 0x06, 0x0201);
9041                         MP_WritePhyUshort(sc, 0x06, 0x4fef);
9042                         MP_WritePhyUshort(sc, 0x06, 0x97ff);
9043                         MP_WritePhyUshort(sc, 0x06, 0xfefc);
9044                         MP_WritePhyUshort(sc, 0x06, 0x0517);
9045                         MP_WritePhyUshort(sc, 0x06, 0xfffe);
9046                         MP_WritePhyUshort(sc, 0x06, 0x0117);
9047                         MP_WritePhyUshort(sc, 0x06, 0x0001);
9048                         MP_WritePhyUshort(sc, 0x06, 0x0200);
9049                         MP_WritePhyUshort(sc, 0x05, 0x83d8);
9050                         MP_WritePhyUshort(sc, 0x06, 0x8000);
9051                         MP_WritePhyUshort(sc, 0x05, 0x83d6);
9052                         MP_WritePhyUshort(sc, 0x06, 0x824f);
9053                         MP_WritePhyUshort(sc, 0x02, 0x2010);
9054                         MP_WritePhyUshort(sc, 0x03, 0xdc00);
9055                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
9056                         MP_WritePhyUshort(sc, 0x0b, 0x0600);
9057                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
9058                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
9059                         MP_WritePhyUshort(sc, 0x06, 0x00fc);
9060                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
9061                 }
9062
9063                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9064                 MP_WritePhyUshort(sc, 0x0D, 0xF880);
9065                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
9066         } else if (sc->re_type == MACFG_36 || sc->re_type == MACFG_37) {
9067                 if (sc->re_type == MACFG_36) {
9068                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
9069                         MP_WritePhyUshort(sc, 0x00, 0x1800);
9070                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
9071                         MP_WritePhyUshort(sc, 0x1e, 0x0023);
9072                         MP_WritePhyUshort(sc, 0x17, 0x0117);
9073                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
9074                         MP_WritePhyUshort(sc, 0x1E, 0x002C);
9075                         MP_WritePhyUshort(sc, 0x1B, 0x5000);
9076                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
9077                         MP_WritePhyUshort(sc, 0x16, 0x4104);
9078                         for (i = 0; i < 200; i++) {
9079                                 DELAY(100);
9080                                 Data = MP_ReadPhyUshort(sc, 0x1E);
9081                                 Data &= 0x03FF;
9082                                 if (Data== 0x000C)
9083                                         break;
9084                         }
9085                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
9086                         for (i = 0; i < 200; i++) {
9087                                 DELAY(100);
9088                                 Data = MP_ReadPhyUshort(sc, 0x07);
9089                                 if ((Data & 0x0020)==0)
9090                                         break;
9091                         }
9092                         Data = MP_ReadPhyUshort(sc, 0x07);
9093                         if (Data & 0x0020) {
9094                                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
9095                                 MP_WritePhyUshort(sc, 0x1e, 0x00a1);
9096                                 MP_WritePhyUshort(sc, 0x17, 0x1000);
9097                                 MP_WritePhyUshort(sc, 0x17, 0x0000);
9098                                 MP_WritePhyUshort(sc, 0x17, 0x2000);
9099                                 MP_WritePhyUshort(sc, 0x1e, 0x002f);
9100                                 MP_WritePhyUshort(sc, 0x18, 0x9bfb);
9101                                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
9102                                 MP_WritePhyUshort(sc, 0x07, 0x0000);
9103                                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
9104                         }
9105                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
9106                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
9107                         MP_WritePhyUshort(sc, 0x06, 0x0080);
9108                         Data = MP_ReadPhyUshort(sc, 0x00);
9109                         Data &= ~(0x0080);
9110                         MP_WritePhyUshort(sc, 0x00, Data);
9111                         MP_WritePhyUshort(sc, 0x1f, 0x0002);
9112                         Data = MP_ReadPhyUshort(sc, 0x08);
9113                         Data &= ~(0x0080);
9114                         MP_WritePhyUshort(sc, 0x08, Data);
9115                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
9116                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
9117                         MP_WritePhyUshort(sc, 0x1e, 0x0023);
9118                         MP_WritePhyUshort(sc, 0x16, 0x0306);
9119                         MP_WritePhyUshort(sc, 0x16, 0x0307);
9120                         MP_WritePhyUshort(sc, 0x15, 0x000e);
9121                         MP_WritePhyUshort(sc, 0x19, 0x000a);
9122                         MP_WritePhyUshort(sc, 0x15, 0x0010);
9123                         MP_WritePhyUshort(sc, 0x19, 0x0008);
9124                         MP_WritePhyUshort(sc, 0x15, 0x0018);
9125                         MP_WritePhyUshort(sc, 0x19, 0x4801);
9126                         MP_WritePhyUshort(sc, 0x15, 0x0019);
9127                         MP_WritePhyUshort(sc, 0x19, 0x6801);
9128                         MP_WritePhyUshort(sc, 0x15, 0x001a);
9129                         MP_WritePhyUshort(sc, 0x19, 0x66a1);
9130                         MP_WritePhyUshort(sc, 0x15, 0x001f);
9131                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9132                         MP_WritePhyUshort(sc, 0x15, 0x0020);
9133                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9134                         MP_WritePhyUshort(sc, 0x15, 0x0021);
9135                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9136                         MP_WritePhyUshort(sc, 0x15, 0x0022);
9137                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9138                         MP_WritePhyUshort(sc, 0x15, 0x0023);
9139                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9140                         MP_WritePhyUshort(sc, 0x15, 0x0024);
9141                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9142                         MP_WritePhyUshort(sc, 0x15, 0x0025);
9143                         MP_WritePhyUshort(sc, 0x19, 0x64a1);
9144                         MP_WritePhyUshort(sc, 0x15, 0x0026);
9145                         MP_WritePhyUshort(sc, 0x19, 0x40ea);
9146                         MP_WritePhyUshort(sc, 0x15, 0x0027);
9147                         MP_WritePhyUshort(sc, 0x19, 0x4503);
9148                         MP_WritePhyUshort(sc, 0x15, 0x0028);
9149                         MP_WritePhyUshort(sc, 0x19, 0x9f00);
9150                         MP_WritePhyUshort(sc, 0x15, 0x0029);
9151                         MP_WritePhyUshort(sc, 0x19, 0xa631);
9152                         MP_WritePhyUshort(sc, 0x15, 0x002a);
9153                         MP_WritePhyUshort(sc, 0x19, 0x9717);
9154                         MP_WritePhyUshort(sc, 0x15, 0x002b);
9155                         MP_WritePhyUshort(sc, 0x19, 0x302c);
9156                         MP_WritePhyUshort(sc, 0x15, 0x002c);
9157                         MP_WritePhyUshort(sc, 0x19, 0x4802);
9158                         MP_WritePhyUshort(sc, 0x15, 0x002d);
9159                         MP_WritePhyUshort(sc, 0x19, 0x58da);
9160                         MP_WritePhyUshort(sc, 0x15, 0x002e);
9161                         MP_WritePhyUshort(sc, 0x19, 0x400d);
9162                         MP_WritePhyUshort(sc, 0x15, 0x002f);
9163                         MP_WritePhyUshort(sc, 0x19, 0x4488);
9164                         MP_WritePhyUshort(sc, 0x15, 0x0030);
9165                         MP_WritePhyUshort(sc, 0x19, 0x9e00);
9166                         MP_WritePhyUshort(sc, 0x15, 0x0031);
9167                         MP_WritePhyUshort(sc, 0x19, 0x63c8);
9168                         MP_WritePhyUshort(sc, 0x15, 0x0032);
9169                         MP_WritePhyUshort(sc, 0x19, 0x6481);
9170                         MP_WritePhyUshort(sc, 0x15, 0x0033);
9171                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9172                         MP_WritePhyUshort(sc, 0x15, 0x0034);
9173                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9174                         MP_WritePhyUshort(sc, 0x15, 0x0035);
9175                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9176                         MP_WritePhyUshort(sc, 0x15, 0x0036);
9177                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9178                         MP_WritePhyUshort(sc, 0x15, 0x0037);
9179                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9180                         MP_WritePhyUshort(sc, 0x15, 0x0038);
9181                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9182                         MP_WritePhyUshort(sc, 0x15, 0x0039);
9183                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9184                         MP_WritePhyUshort(sc, 0x15, 0x003a);
9185                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9186                         MP_WritePhyUshort(sc, 0x15, 0x003b);
9187                         MP_WritePhyUshort(sc, 0x19, 0x63e8);
9188                         MP_WritePhyUshort(sc, 0x15, 0x003c);
9189                         MP_WritePhyUshort(sc, 0x19, 0x7d00);
9190                         MP_WritePhyUshort(sc, 0x15, 0x003d);
9191                         MP_WritePhyUshort(sc, 0x19, 0x59d4);
9192                         MP_WritePhyUshort(sc, 0x15, 0x003e);
9193                         MP_WritePhyUshort(sc, 0x19, 0x63f8);
9194                         MP_WritePhyUshort(sc, 0x15, 0x0040);
9195                         MP_WritePhyUshort(sc, 0x19, 0x64a1);
9196                         MP_WritePhyUshort(sc, 0x15, 0x0041);
9197                         MP_WritePhyUshort(sc, 0x19, 0x30de);
9198                         MP_WritePhyUshort(sc, 0x15, 0x0044);
9199                         MP_WritePhyUshort(sc, 0x19, 0x480f);
9200                         MP_WritePhyUshort(sc, 0x15, 0x0045);
9201                         MP_WritePhyUshort(sc, 0x19, 0x6800);
9202                         MP_WritePhyUshort(sc, 0x15, 0x0046);
9203                         MP_WritePhyUshort(sc, 0x19, 0x6680);
9204                         MP_WritePhyUshort(sc, 0x15, 0x0047);
9205                         MP_WritePhyUshort(sc, 0x19, 0x7c10);
9206                         MP_WritePhyUshort(sc, 0x15, 0x0048);
9207                         MP_WritePhyUshort(sc, 0x19, 0x63c8);
9208                         MP_WritePhyUshort(sc, 0x15, 0x0049);
9209                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9210                         MP_WritePhyUshort(sc, 0x15, 0x004a);
9211                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9212                         MP_WritePhyUshort(sc, 0x15, 0x004b);
9213                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9214                         MP_WritePhyUshort(sc, 0x15, 0x004c);
9215                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9216                         MP_WritePhyUshort(sc, 0x15, 0x004d);
9217                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9218                         MP_WritePhyUshort(sc, 0x15, 0x004e);
9219                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9220                         MP_WritePhyUshort(sc, 0x15, 0x004f);
9221                         MP_WritePhyUshort(sc, 0x19, 0x40ea);
9222                         MP_WritePhyUshort(sc, 0x15, 0x0050);
9223                         MP_WritePhyUshort(sc, 0x19, 0x4503);
9224                         MP_WritePhyUshort(sc, 0x15, 0x0051);
9225                         MP_WritePhyUshort(sc, 0x19, 0x58ca);
9226                         MP_WritePhyUshort(sc, 0x15, 0x0052);
9227                         MP_WritePhyUshort(sc, 0x19, 0x63c8);
9228                         MP_WritePhyUshort(sc, 0x15, 0x0053);
9229                         MP_WritePhyUshort(sc, 0x19, 0x63d8);
9230                         MP_WritePhyUshort(sc, 0x15, 0x0054);
9231                         MP_WritePhyUshort(sc, 0x19, 0x66a0);
9232                         MP_WritePhyUshort(sc, 0x15, 0x0055);
9233                         MP_WritePhyUshort(sc, 0x19, 0x9f00);
9234                         MP_WritePhyUshort(sc, 0x15, 0x0056);
9235                         MP_WritePhyUshort(sc, 0x19, 0x3000);
9236                         MP_WritePhyUshort(sc, 0x15, 0x006E);
9237                         MP_WritePhyUshort(sc, 0x19, 0x9afa);
9238                         MP_WritePhyUshort(sc, 0x15, 0x00a1);
9239                         MP_WritePhyUshort(sc, 0x19, 0x3044);
9240                         MP_WritePhyUshort(sc, 0x15, 0x00ab);
9241                         MP_WritePhyUshort(sc, 0x19, 0x5820);
9242                         MP_WritePhyUshort(sc, 0x15, 0x00ac);
9243                         MP_WritePhyUshort(sc, 0x19, 0x5e04);
9244                         MP_WritePhyUshort(sc, 0x15, 0x00ad);
9245                         MP_WritePhyUshort(sc, 0x19, 0xb60c);
9246                         MP_WritePhyUshort(sc, 0x15, 0x00af);
9247                         MP_WritePhyUshort(sc, 0x19, 0x000a);
9248                         MP_WritePhyUshort(sc, 0x15, 0x00b2);
9249                         MP_WritePhyUshort(sc, 0x19, 0x30b9);
9250                         MP_WritePhyUshort(sc, 0x15, 0x00b9);
9251                         MP_WritePhyUshort(sc, 0x19, 0x4408);
9252                         MP_WritePhyUshort(sc, 0x15, 0x00ba);
9253                         MP_WritePhyUshort(sc, 0x19, 0x480b);
9254                         MP_WritePhyUshort(sc, 0x15, 0x00bb);
9255                         MP_WritePhyUshort(sc, 0x19, 0x5e00);
9256                         MP_WritePhyUshort(sc, 0x15, 0x00bc);
9257                         MP_WritePhyUshort(sc, 0x19, 0x405f);
9258                         MP_WritePhyUshort(sc, 0x15, 0x00bd);
9259                         MP_WritePhyUshort(sc, 0x19, 0x4448);
9260                         MP_WritePhyUshort(sc, 0x15, 0x00be);
9261                         MP_WritePhyUshort(sc, 0x19, 0x4020);
9262                         MP_WritePhyUshort(sc, 0x15, 0x00bf);
9263                         MP_WritePhyUshort(sc, 0x19, 0x4468);
9264                         MP_WritePhyUshort(sc, 0x15, 0x00c0);
9265                         MP_WritePhyUshort(sc, 0x19, 0x9c02);
9266                         MP_WritePhyUshort(sc, 0x15, 0x00c1);
9267                         MP_WritePhyUshort(sc, 0x19, 0x58a0);
9268                         MP_WritePhyUshort(sc, 0x15, 0x00c2);
9269                         MP_WritePhyUshort(sc, 0x19, 0xb605);
9270                         MP_WritePhyUshort(sc, 0x15, 0x00c3);
9271                         MP_WritePhyUshort(sc, 0x19, 0xc0d3);
9272                         MP_WritePhyUshort(sc, 0x15, 0x00c4);
9273                         MP_WritePhyUshort(sc, 0x19, 0x00e6);
9274                         MP_WritePhyUshort(sc, 0x15, 0x00c5);
9275                         MP_WritePhyUshort(sc, 0x19, 0xdaec);
9276                         MP_WritePhyUshort(sc, 0x15, 0x00c6);
9277                         MP_WritePhyUshort(sc, 0x19, 0x00fa);
9278                         MP_WritePhyUshort(sc, 0x15, 0x00c7);
9279                         MP_WritePhyUshort(sc, 0x19, 0x9df9);
9280                         MP_WritePhyUshort(sc, 0x15, 0x00c8);
9281                         MP_WritePhyUshort(sc, 0x19, 0x307a);
9282                         MP_WritePhyUshort(sc, 0x15, 0x0112);
9283                         MP_WritePhyUshort(sc, 0x19, 0x6421);
9284                         MP_WritePhyUshort(sc, 0x15, 0x0113);
9285                         MP_WritePhyUshort(sc, 0x19, 0x7c08);
9286                         MP_WritePhyUshort(sc, 0x15, 0x0114);
9287                         MP_WritePhyUshort(sc, 0x19, 0x63f0);
9288                         MP_WritePhyUshort(sc, 0x15, 0x0115);
9289                         MP_WritePhyUshort(sc, 0x19, 0x4003);
9290                         MP_WritePhyUshort(sc, 0x15, 0x0116);
9291                         MP_WritePhyUshort(sc, 0x19, 0x4418);
9292                         MP_WritePhyUshort(sc, 0x15, 0x0117);
9293                         MP_WritePhyUshort(sc, 0x19, 0x9b00);
9294                         MP_WritePhyUshort(sc, 0x15, 0x0118);
9295                         MP_WritePhyUshort(sc, 0x19, 0x6461);
9296                         MP_WritePhyUshort(sc, 0x15, 0x0119);
9297                         MP_WritePhyUshort(sc, 0x19, 0x64e1);
9298                         MP_WritePhyUshort(sc, 0x15, 0x011a);
9299                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9300                         MP_WritePhyUshort(sc, 0x15, 0x0150);
9301                         MP_WritePhyUshort(sc, 0x19, 0x7c80);
9302                         MP_WritePhyUshort(sc, 0x15, 0x0151);
9303                         MP_WritePhyUshort(sc, 0x19, 0x6461);
9304                         MP_WritePhyUshort(sc, 0x15, 0x0152);
9305                         MP_WritePhyUshort(sc, 0x19, 0x4003);
9306                         MP_WritePhyUshort(sc, 0x15, 0x0153);
9307                         MP_WritePhyUshort(sc, 0x19, 0x4540);
9308                         MP_WritePhyUshort(sc, 0x15, 0x0154);
9309                         MP_WritePhyUshort(sc, 0x19, 0x9f00);
9310                         MP_WritePhyUshort(sc, 0x15, 0x0155);
9311                         MP_WritePhyUshort(sc, 0x19, 0x9d00);
9312                         MP_WritePhyUshort(sc, 0x15, 0x0156);
9313                         MP_WritePhyUshort(sc, 0x19, 0x7c40);
9314                         MP_WritePhyUshort(sc, 0x15, 0x0157);
9315                         MP_WritePhyUshort(sc, 0x19, 0x6421);
9316                         MP_WritePhyUshort(sc, 0x15, 0x0158);
9317                         MP_WritePhyUshort(sc, 0x19, 0x7c80);
9318                         MP_WritePhyUshort(sc, 0x15, 0x0159);
9319                         MP_WritePhyUshort(sc, 0x19, 0x64a1);
9320                         MP_WritePhyUshort(sc, 0x15, 0x015a);
9321                         MP_WritePhyUshort(sc, 0x19, 0x30fe);
9322                         MP_WritePhyUshort(sc, 0x15, 0x021e);
9323                         MP_WritePhyUshort(sc, 0x19, 0x5410);
9324                         MP_WritePhyUshort(sc, 0x15, 0x0225);
9325                         MP_WritePhyUshort(sc, 0x19, 0x5400);
9326                         MP_WritePhyUshort(sc, 0x15, 0x023D);
9327                         MP_WritePhyUshort(sc, 0x19, 0x4050);
9328                         MP_WritePhyUshort(sc, 0x15, 0x0295);
9329                         MP_WritePhyUshort(sc, 0x19, 0x6c08);
9330                         MP_WritePhyUshort(sc, 0x15, 0x02bd);
9331                         MP_WritePhyUshort(sc, 0x19, 0xa523);
9332                         MP_WritePhyUshort(sc, 0x15, 0x02be);
9333                         MP_WritePhyUshort(sc, 0x19, 0x32ca);
9334                         MP_WritePhyUshort(sc, 0x15, 0x02ca);
9335                         MP_WritePhyUshort(sc, 0x19, 0x48b3);
9336                         MP_WritePhyUshort(sc, 0x15, 0x02cb);
9337                         MP_WritePhyUshort(sc, 0x19, 0x4020);
9338                         MP_WritePhyUshort(sc, 0x15, 0x02cc);
9339                         MP_WritePhyUshort(sc, 0x19, 0x4823);
9340                         MP_WritePhyUshort(sc, 0x15, 0x02cd);
9341                         MP_WritePhyUshort(sc, 0x19, 0x4510);
9342                         MP_WritePhyUshort(sc, 0x15, 0x02ce);
9343                         MP_WritePhyUshort(sc, 0x19, 0xb63a);
9344                         MP_WritePhyUshort(sc, 0x15, 0x02cf);
9345                         MP_WritePhyUshort(sc, 0x19, 0x7dc8);
9346                         MP_WritePhyUshort(sc, 0x15, 0x02d6);
9347                         MP_WritePhyUshort(sc, 0x19, 0x9bf8);
9348                         MP_WritePhyUshort(sc, 0x15, 0x02d8);
9349                         MP_WritePhyUshort(sc, 0x19, 0x85f6);
9350                         MP_WritePhyUshort(sc, 0x15, 0x02d9);
9351                         MP_WritePhyUshort(sc, 0x19, 0x32e0);
9352                         MP_WritePhyUshort(sc, 0x15, 0x02e0);
9353                         MP_WritePhyUshort(sc, 0x19, 0x4834);
9354                         MP_WritePhyUshort(sc, 0x15, 0x02e1);
9355                         MP_WritePhyUshort(sc, 0x19, 0x6c08);
9356                         MP_WritePhyUshort(sc, 0x15, 0x02e2);
9357                         MP_WritePhyUshort(sc, 0x19, 0x4020);
9358                         MP_WritePhyUshort(sc, 0x15, 0x02e3);
9359                         MP_WritePhyUshort(sc, 0x19, 0x4824);
9360                         MP_WritePhyUshort(sc, 0x15, 0x02e4);
9361                         MP_WritePhyUshort(sc, 0x19, 0x4520);
9362                         MP_WritePhyUshort(sc, 0x15, 0x02e5);
9363                         MP_WritePhyUshort(sc, 0x19, 0x4008);
9364                         MP_WritePhyUshort(sc, 0x15, 0x02e6);
9365                         MP_WritePhyUshort(sc, 0x19, 0x4560);
9366                         MP_WritePhyUshort(sc, 0x15, 0x02e7);
9367                         MP_WritePhyUshort(sc, 0x19, 0x9d04);
9368                         MP_WritePhyUshort(sc, 0x15, 0x02e8);
9369                         MP_WritePhyUshort(sc, 0x19, 0x48c4);
9370                         MP_WritePhyUshort(sc, 0x15, 0x02e9);
9371                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9372                         MP_WritePhyUshort(sc, 0x15, 0x02ea);
9373                         MP_WritePhyUshort(sc, 0x19, 0x4844);
9374                         MP_WritePhyUshort(sc, 0x15, 0x02eb);
9375                         MP_WritePhyUshort(sc, 0x19, 0x7dc8);
9376                         MP_WritePhyUshort(sc, 0x15, 0x02f0);
9377                         MP_WritePhyUshort(sc, 0x19, 0x9cf7);
9378                         MP_WritePhyUshort(sc, 0x15, 0x02f1);
9379                         MP_WritePhyUshort(sc, 0x19, 0xdf94);
9380                         MP_WritePhyUshort(sc, 0x15, 0x02f2);
9381                         MP_WritePhyUshort(sc, 0x19, 0x0002);
9382                         MP_WritePhyUshort(sc, 0x15, 0x02f3);
9383                         MP_WritePhyUshort(sc, 0x19, 0x6810);
9384                         MP_WritePhyUshort(sc, 0x15, 0x02f4);
9385                         MP_WritePhyUshort(sc, 0x19, 0xb614);
9386                         MP_WritePhyUshort(sc, 0x15, 0x02f5);
9387                         MP_WritePhyUshort(sc, 0x19, 0xc42b);
9388                         MP_WritePhyUshort(sc, 0x15, 0x02f6);
9389                         MP_WritePhyUshort(sc, 0x19, 0x00d4);
9390                         MP_WritePhyUshort(sc, 0x15, 0x02f7);
9391                         MP_WritePhyUshort(sc, 0x19, 0xc455);
9392                         MP_WritePhyUshort(sc, 0x15, 0x02f8);
9393                         MP_WritePhyUshort(sc, 0x19, 0x0093);
9394                         MP_WritePhyUshort(sc, 0x15, 0x02f9);
9395                         MP_WritePhyUshort(sc, 0x19, 0x92ee);
9396                         MP_WritePhyUshort(sc, 0x15, 0x02fa);
9397                         MP_WritePhyUshort(sc, 0x19, 0xefed);
9398                         MP_WritePhyUshort(sc, 0x15, 0x02fb);
9399                         MP_WritePhyUshort(sc, 0x19, 0x3312);
9400                         MP_WritePhyUshort(sc, 0x15, 0x0312);
9401                         MP_WritePhyUshort(sc, 0x19, 0x49b5);
9402                         MP_WritePhyUshort(sc, 0x15, 0x0313);
9403                         MP_WritePhyUshort(sc, 0x19, 0x7d00);
9404                         MP_WritePhyUshort(sc, 0x15, 0x0314);
9405                         MP_WritePhyUshort(sc, 0x19, 0x4d00);
9406                         MP_WritePhyUshort(sc, 0x15, 0x0315);
9407                         MP_WritePhyUshort(sc, 0x19, 0x6810);
9408                         MP_WritePhyUshort(sc, 0x15, 0x031e);
9409                         MP_WritePhyUshort(sc, 0x19, 0x404f);
9410                         MP_WritePhyUshort(sc, 0x15, 0x031f);
9411                         MP_WritePhyUshort(sc, 0x19, 0x44c8);
9412                         MP_WritePhyUshort(sc, 0x15, 0x0320);
9413                         MP_WritePhyUshort(sc, 0x19, 0xd64f);
9414                         MP_WritePhyUshort(sc, 0x15, 0x0321);
9415                         MP_WritePhyUshort(sc, 0x19, 0x00e7);
9416                         MP_WritePhyUshort(sc, 0x15, 0x0322);
9417                         MP_WritePhyUshort(sc, 0x19, 0x7c08);
9418                         MP_WritePhyUshort(sc, 0x15, 0x0323);
9419                         MP_WritePhyUshort(sc, 0x19, 0x8203);
9420                         MP_WritePhyUshort(sc, 0x15, 0x0324);
9421                         MP_WritePhyUshort(sc, 0x19, 0x4d48);
9422                         MP_WritePhyUshort(sc, 0x15, 0x0325);
9423                         MP_WritePhyUshort(sc, 0x19, 0x3327);
9424                         MP_WritePhyUshort(sc, 0x15, 0x0326);
9425                         MP_WritePhyUshort(sc, 0x19, 0x4d40);
9426                         MP_WritePhyUshort(sc, 0x15, 0x0327);
9427                         MP_WritePhyUshort(sc, 0x19, 0xc8d7);
9428                         MP_WritePhyUshort(sc, 0x15, 0x0328);
9429                         MP_WritePhyUshort(sc, 0x19, 0x0003);
9430                         MP_WritePhyUshort(sc, 0x15, 0x0329);
9431                         MP_WritePhyUshort(sc, 0x19, 0x7c20);
9432                         MP_WritePhyUshort(sc, 0x15, 0x032a);
9433                         MP_WritePhyUshort(sc, 0x19, 0x4c20);
9434                         MP_WritePhyUshort(sc, 0x15, 0x032b);
9435                         MP_WritePhyUshort(sc, 0x19, 0xc8ed);
9436                         MP_WritePhyUshort(sc, 0x15, 0x032c);
9437                         MP_WritePhyUshort(sc, 0x19, 0x00f4);
9438                         MP_WritePhyUshort(sc, 0x15, 0x032d);
9439                         MP_WritePhyUshort(sc, 0x19, 0x82b3);
9440                         MP_WritePhyUshort(sc, 0x15, 0x032e);
9441                         MP_WritePhyUshort(sc, 0x19, 0xd11d);
9442                         MP_WritePhyUshort(sc, 0x15, 0x032f);
9443                         MP_WritePhyUshort(sc, 0x19, 0x00b1);
9444                         MP_WritePhyUshort(sc, 0x15, 0x0330);
9445                         MP_WritePhyUshort(sc, 0x19, 0xde18);
9446                         MP_WritePhyUshort(sc, 0x15, 0x0331);
9447                         MP_WritePhyUshort(sc, 0x19, 0x0008);
9448                         MP_WritePhyUshort(sc, 0x15, 0x0332);
9449                         MP_WritePhyUshort(sc, 0x19, 0x91ee);
9450                         MP_WritePhyUshort(sc, 0x15, 0x0333);
9451                         MP_WritePhyUshort(sc, 0x19, 0x3339);
9452                         MP_WritePhyUshort(sc, 0x15, 0x033a);
9453                         MP_WritePhyUshort(sc, 0x19, 0x4064);
9454                         MP_WritePhyUshort(sc, 0x15, 0x0340);
9455                         MP_WritePhyUshort(sc, 0x19, 0x9e06);
9456                         MP_WritePhyUshort(sc, 0x15, 0x0341);
9457                         MP_WritePhyUshort(sc, 0x19, 0x7c08);
9458                         MP_WritePhyUshort(sc, 0x15, 0x0342);
9459                         MP_WritePhyUshort(sc, 0x19, 0x8203);
9460                         MP_WritePhyUshort(sc, 0x15, 0x0343);
9461                         MP_WritePhyUshort(sc, 0x19, 0x4d48);
9462                         MP_WritePhyUshort(sc, 0x15, 0x0344);
9463                         MP_WritePhyUshort(sc, 0x19, 0x3346);
9464                         MP_WritePhyUshort(sc, 0x15, 0x0345);
9465                         MP_WritePhyUshort(sc, 0x19, 0x4d40);
9466                         MP_WritePhyUshort(sc, 0x15, 0x0346);
9467                         MP_WritePhyUshort(sc, 0x19, 0xd11d);
9468                         MP_WritePhyUshort(sc, 0x15, 0x0347);
9469                         MP_WritePhyUshort(sc, 0x19, 0x0099);
9470                         MP_WritePhyUshort(sc, 0x15, 0x0348);
9471                         MP_WritePhyUshort(sc, 0x19, 0xbb17);
9472                         MP_WritePhyUshort(sc, 0x15, 0x0349);
9473                         MP_WritePhyUshort(sc, 0x19, 0x8102);
9474                         MP_WritePhyUshort(sc, 0x15, 0x034a);
9475                         MP_WritePhyUshort(sc, 0x19, 0x334d);
9476                         MP_WritePhyUshort(sc, 0x15, 0x034b);
9477                         MP_WritePhyUshort(sc, 0x19, 0xa22c);
9478                         MP_WritePhyUshort(sc, 0x15, 0x034c);
9479                         MP_WritePhyUshort(sc, 0x19, 0x3397);
9480                         MP_WritePhyUshort(sc, 0x15, 0x034d);
9481                         MP_WritePhyUshort(sc, 0x19, 0x91f2);
9482                         MP_WritePhyUshort(sc, 0x15, 0x034e);
9483                         MP_WritePhyUshort(sc, 0x19, 0xc218);
9484                         MP_WritePhyUshort(sc, 0x15, 0x034f);
9485                         MP_WritePhyUshort(sc, 0x19, 0x00f0);
9486                         MP_WritePhyUshort(sc, 0x15, 0x0350);
9487                         MP_WritePhyUshort(sc, 0x19, 0x3397);
9488                         MP_WritePhyUshort(sc, 0x15, 0x0351);
9489                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9490                         MP_WritePhyUshort(sc, 0x15, 0x0364);
9491                         MP_WritePhyUshort(sc, 0x19, 0xbc05);
9492                         MP_WritePhyUshort(sc, 0x15, 0x0367);
9493                         MP_WritePhyUshort(sc, 0x19, 0xa1fc);
9494                         MP_WritePhyUshort(sc, 0x15, 0x0368);
9495                         MP_WritePhyUshort(sc, 0x19, 0x3377);
9496                         MP_WritePhyUshort(sc, 0x15, 0x0369);
9497                         MP_WritePhyUshort(sc, 0x19, 0x328b);
9498                         MP_WritePhyUshort(sc, 0x15, 0x036a);
9499                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9500                         MP_WritePhyUshort(sc, 0x15, 0x0377);
9501                         MP_WritePhyUshort(sc, 0x19, 0x4b97);
9502                         MP_WritePhyUshort(sc, 0x15, 0x0378);
9503                         MP_WritePhyUshort(sc, 0x19, 0x6818);
9504                         MP_WritePhyUshort(sc, 0x15, 0x0379);
9505                         MP_WritePhyUshort(sc, 0x19, 0x4b07);
9506                         MP_WritePhyUshort(sc, 0x15, 0x037a);
9507                         MP_WritePhyUshort(sc, 0x19, 0x40ac);
9508                         MP_WritePhyUshort(sc, 0x15, 0x037b);
9509                         MP_WritePhyUshort(sc, 0x19, 0x4445);
9510                         MP_WritePhyUshort(sc, 0x15, 0x037c);
9511                         MP_WritePhyUshort(sc, 0x19, 0x404e);
9512                         MP_WritePhyUshort(sc, 0x15, 0x037d);
9513                         MP_WritePhyUshort(sc, 0x19, 0x4461);
9514                         MP_WritePhyUshort(sc, 0x15, 0x037e);
9515                         MP_WritePhyUshort(sc, 0x19, 0x9c09);
9516                         MP_WritePhyUshort(sc, 0x15, 0x037f);
9517                         MP_WritePhyUshort(sc, 0x19, 0x63da);
9518                         MP_WritePhyUshort(sc, 0x15, 0x0380);
9519                         MP_WritePhyUshort(sc, 0x19, 0x5440);
9520                         MP_WritePhyUshort(sc, 0x15, 0x0381);
9521                         MP_WritePhyUshort(sc, 0x19, 0x4b98);
9522                         MP_WritePhyUshort(sc, 0x15, 0x0382);
9523                         MP_WritePhyUshort(sc, 0x19, 0x7c60);
9524                         MP_WritePhyUshort(sc, 0x15, 0x0383);
9525                         MP_WritePhyUshort(sc, 0x19, 0x4c00);
9526                         MP_WritePhyUshort(sc, 0x15, 0x0384);
9527                         MP_WritePhyUshort(sc, 0x19, 0x4b08);
9528                         MP_WritePhyUshort(sc, 0x15, 0x0385);
9529                         MP_WritePhyUshort(sc, 0x19, 0x63d8);
9530                         MP_WritePhyUshort(sc, 0x15, 0x0386);
9531                         MP_WritePhyUshort(sc, 0x19, 0x338d);
9532                         MP_WritePhyUshort(sc, 0x15, 0x0387);
9533                         MP_WritePhyUshort(sc, 0x19, 0xd64f);
9534                         MP_WritePhyUshort(sc, 0x15, 0x0388);
9535                         MP_WritePhyUshort(sc, 0x19, 0x0080);
9536                         MP_WritePhyUshort(sc, 0x15, 0x0389);
9537                         MP_WritePhyUshort(sc, 0x19, 0x820c);
9538                         MP_WritePhyUshort(sc, 0x15, 0x038a);
9539                         MP_WritePhyUshort(sc, 0x19, 0xa10b);
9540                         MP_WritePhyUshort(sc, 0x15, 0x038b);
9541                         MP_WritePhyUshort(sc, 0x19, 0x9df3);
9542                         MP_WritePhyUshort(sc, 0x15, 0x038c);
9543                         MP_WritePhyUshort(sc, 0x19, 0x3395);
9544                         MP_WritePhyUshort(sc, 0x15, 0x038d);
9545                         MP_WritePhyUshort(sc, 0x19, 0xd64f);
9546                         MP_WritePhyUshort(sc, 0x15, 0x038e);
9547                         MP_WritePhyUshort(sc, 0x19, 0x00f9);
9548                         MP_WritePhyUshort(sc, 0x15, 0x038f);
9549                         MP_WritePhyUshort(sc, 0x19, 0xc017);
9550                         MP_WritePhyUshort(sc, 0x15, 0x0390);
9551                         MP_WritePhyUshort(sc, 0x19, 0x0005);
9552                         MP_WritePhyUshort(sc, 0x15, 0x0391);
9553                         MP_WritePhyUshort(sc, 0x19, 0x6c0b);
9554                         MP_WritePhyUshort(sc, 0x15, 0x0392);
9555                         MP_WritePhyUshort(sc, 0x19, 0xa103);
9556                         MP_WritePhyUshort(sc, 0x15, 0x0393);
9557                         MP_WritePhyUshort(sc, 0x19, 0x6c08);
9558                         MP_WritePhyUshort(sc, 0x15, 0x0394);
9559                         MP_WritePhyUshort(sc, 0x19, 0x9df9);
9560                         MP_WritePhyUshort(sc, 0x15, 0x0395);
9561                         MP_WritePhyUshort(sc, 0x19, 0x6c08);
9562                         MP_WritePhyUshort(sc, 0x15, 0x0396);
9563                         MP_WritePhyUshort(sc, 0x19, 0x3397);
9564                         MP_WritePhyUshort(sc, 0x15, 0x0399);
9565                         MP_WritePhyUshort(sc, 0x19, 0x6810);
9566                         MP_WritePhyUshort(sc, 0x15, 0x03a4);
9567                         MP_WritePhyUshort(sc, 0x19, 0x7c08);
9568                         MP_WritePhyUshort(sc, 0x15, 0x03a5);
9569                         MP_WritePhyUshort(sc, 0x19, 0x8203);
9570                         MP_WritePhyUshort(sc, 0x15, 0x03a6);
9571                         MP_WritePhyUshort(sc, 0x19, 0x4d08);
9572                         MP_WritePhyUshort(sc, 0x15, 0x03a7);
9573                         MP_WritePhyUshort(sc, 0x19, 0x33a9);
9574                         MP_WritePhyUshort(sc, 0x15, 0x03a8);
9575                         MP_WritePhyUshort(sc, 0x19, 0x4d00);
9576                         MP_WritePhyUshort(sc, 0x15, 0x03a9);
9577                         MP_WritePhyUshort(sc, 0x19, 0x9bfa);
9578                         MP_WritePhyUshort(sc, 0x15, 0x03aa);
9579                         MP_WritePhyUshort(sc, 0x19, 0x33b6);
9580                         MP_WritePhyUshort(sc, 0x15, 0x03bb);
9581                         MP_WritePhyUshort(sc, 0x19, 0x4056);
9582                         MP_WritePhyUshort(sc, 0x15, 0x03bc);
9583                         MP_WritePhyUshort(sc, 0x19, 0x44e9);
9584                         MP_WritePhyUshort(sc, 0x15, 0x03bd);
9585                         MP_WritePhyUshort(sc, 0x19, 0x405e);
9586                         MP_WritePhyUshort(sc, 0x15, 0x03be);
9587                         MP_WritePhyUshort(sc, 0x19, 0x44f8);
9588                         MP_WritePhyUshort(sc, 0x15, 0x03bf);
9589                         MP_WritePhyUshort(sc, 0x19, 0xd64f);
9590                         MP_WritePhyUshort(sc, 0x15, 0x03c0);
9591                         MP_WritePhyUshort(sc, 0x19, 0x0037);
9592                         MP_WritePhyUshort(sc, 0x15, 0x03c1);
9593                         MP_WritePhyUshort(sc, 0x19, 0xbd37);
9594                         MP_WritePhyUshort(sc, 0x15, 0x03c2);
9595                         MP_WritePhyUshort(sc, 0x19, 0x9cfd);
9596                         MP_WritePhyUshort(sc, 0x15, 0x03c3);
9597                         MP_WritePhyUshort(sc, 0x19, 0xc639);
9598                         MP_WritePhyUshort(sc, 0x15, 0x03c4);
9599                         MP_WritePhyUshort(sc, 0x19, 0x0011);
9600                         MP_WritePhyUshort(sc, 0x15, 0x03c5);
9601                         MP_WritePhyUshort(sc, 0x19, 0x9b03);
9602                         MP_WritePhyUshort(sc, 0x15, 0x03c6);
9603                         MP_WritePhyUshort(sc, 0x19, 0x7c01);
9604                         MP_WritePhyUshort(sc, 0x15, 0x03c7);
9605                         MP_WritePhyUshort(sc, 0x19, 0x4c01);
9606                         MP_WritePhyUshort(sc, 0x15, 0x03c8);
9607                         MP_WritePhyUshort(sc, 0x19, 0x9e03);
9608                         MP_WritePhyUshort(sc, 0x15, 0x03c9);
9609                         MP_WritePhyUshort(sc, 0x19, 0x7c20);
9610                         MP_WritePhyUshort(sc, 0x15, 0x03ca);
9611                         MP_WritePhyUshort(sc, 0x19, 0x4c20);
9612                         MP_WritePhyUshort(sc, 0x15, 0x03cb);
9613                         MP_WritePhyUshort(sc, 0x19, 0x9af4);
9614                         MP_WritePhyUshort(sc, 0x15, 0x03cc);
9615                         MP_WritePhyUshort(sc, 0x19, 0x7c12);
9616                         MP_WritePhyUshort(sc, 0x15, 0x03cd);
9617                         MP_WritePhyUshort(sc, 0x19, 0x4c52);
9618                         MP_WritePhyUshort(sc, 0x15, 0x03ce);
9619                         MP_WritePhyUshort(sc, 0x19, 0x4470);
9620                         MP_WritePhyUshort(sc, 0x15, 0x03cf);
9621                         MP_WritePhyUshort(sc, 0x19, 0x7c12);
9622                         MP_WritePhyUshort(sc, 0x15, 0x03d0);
9623                         MP_WritePhyUshort(sc, 0x19, 0x4c40);
9624                         MP_WritePhyUshort(sc, 0x15, 0x03d1);
9625                         MP_WritePhyUshort(sc, 0x19, 0x33bf);
9626                         MP_WritePhyUshort(sc, 0x15, 0x03d6);
9627                         MP_WritePhyUshort(sc, 0x19, 0x4047);
9628                         MP_WritePhyUshort(sc, 0x15, 0x03d7);
9629                         MP_WritePhyUshort(sc, 0x19, 0x4469);
9630                         MP_WritePhyUshort(sc, 0x15, 0x03d8);
9631                         MP_WritePhyUshort(sc, 0x19, 0x492b);
9632                         MP_WritePhyUshort(sc, 0x15, 0x03d9);
9633                         MP_WritePhyUshort(sc, 0x19, 0x4479);
9634                         MP_WritePhyUshort(sc, 0x15, 0x03da);
9635                         MP_WritePhyUshort(sc, 0x19, 0x7c09);
9636                         MP_WritePhyUshort(sc, 0x15, 0x03db);
9637                         MP_WritePhyUshort(sc, 0x19, 0x8203);
9638                         MP_WritePhyUshort(sc, 0x15, 0x03dc);
9639                         MP_WritePhyUshort(sc, 0x19, 0x4d48);
9640                         MP_WritePhyUshort(sc, 0x15, 0x03dd);
9641                         MP_WritePhyUshort(sc, 0x19, 0x33df);
9642                         MP_WritePhyUshort(sc, 0x15, 0x03de);
9643                         MP_WritePhyUshort(sc, 0x19, 0x4d40);
9644                         MP_WritePhyUshort(sc, 0x15, 0x03df);
9645                         MP_WritePhyUshort(sc, 0x19, 0xd64f);
9646                         MP_WritePhyUshort(sc, 0x15, 0x03e0);
9647                         MP_WritePhyUshort(sc, 0x19, 0x0017);
9648                         MP_WritePhyUshort(sc, 0x15, 0x03e1);
9649                         MP_WritePhyUshort(sc, 0x19, 0xbd17);
9650                         MP_WritePhyUshort(sc, 0x15, 0x03e2);
9651                         MP_WritePhyUshort(sc, 0x19, 0x9b03);
9652                         MP_WritePhyUshort(sc, 0x15, 0x03e3);
9653                         MP_WritePhyUshort(sc, 0x19, 0x7c20);
9654                         MP_WritePhyUshort(sc, 0x15, 0x03e4);
9655                         MP_WritePhyUshort(sc, 0x19, 0x4c20);
9656                         MP_WritePhyUshort(sc, 0x15, 0x03e5);
9657                         MP_WritePhyUshort(sc, 0x19, 0x88f5);
9658                         MP_WritePhyUshort(sc, 0x15, 0x03e6);
9659                         MP_WritePhyUshort(sc, 0x19, 0xc428);
9660                         MP_WritePhyUshort(sc, 0x15, 0x03e7);
9661                         MP_WritePhyUshort(sc, 0x19, 0x0008);
9662                         MP_WritePhyUshort(sc, 0x15, 0x03e8);
9663                         MP_WritePhyUshort(sc, 0x19, 0x9af2);
9664                         MP_WritePhyUshort(sc, 0x15, 0x03e9);
9665                         MP_WritePhyUshort(sc, 0x19, 0x7c12);
9666                         MP_WritePhyUshort(sc, 0x15, 0x03ea);
9667                         MP_WritePhyUshort(sc, 0x19, 0x4c52);
9668                         MP_WritePhyUshort(sc, 0x15, 0x03eb);
9669                         MP_WritePhyUshort(sc, 0x19, 0x4470);
9670                         MP_WritePhyUshort(sc, 0x15, 0x03ec);
9671                         MP_WritePhyUshort(sc, 0x19, 0x7c12);
9672                         MP_WritePhyUshort(sc, 0x15, 0x03ed);
9673                         MP_WritePhyUshort(sc, 0x19, 0x4c40);
9674                         MP_WritePhyUshort(sc, 0x15, 0x03ee);
9675                         MP_WritePhyUshort(sc, 0x19, 0x33da);
9676                         MP_WritePhyUshort(sc, 0x15, 0x03ef);
9677                         MP_WritePhyUshort(sc, 0x19, 0x3312);
9678                         MP_WritePhyUshort(sc, 0x16, 0x0306);
9679                         MP_WritePhyUshort(sc, 0x16, 0x0300);
9680                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
9681                         MP_WritePhyUshort(sc, 0x17, 0x2179);
9682                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
9683                         MP_WritePhyUshort(sc, 0x1e, 0x0040);
9684                         MP_WritePhyUshort(sc, 0x18, 0x0645);
9685                         MP_WritePhyUshort(sc, 0x19, 0xe200);
9686                         MP_WritePhyUshort(sc, 0x18, 0x0655);
9687                         MP_WritePhyUshort(sc, 0x19, 0x9000);
9688                         MP_WritePhyUshort(sc, 0x18, 0x0d05);
9689                         MP_WritePhyUshort(sc, 0x19, 0xbe00);
9690                         MP_WritePhyUshort(sc, 0x18, 0x0d15);
9691                         MP_WritePhyUshort(sc, 0x19, 0xd300);
9692                         MP_WritePhyUshort(sc, 0x18, 0x0d25);
9693                         MP_WritePhyUshort(sc, 0x19, 0xfe00);
9694                         MP_WritePhyUshort(sc, 0x18, 0x0d35);
9695                         MP_WritePhyUshort(sc, 0x19, 0x4000);
9696                         MP_WritePhyUshort(sc, 0x18, 0x0d45);
9697                         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9698                         MP_WritePhyUshort(sc, 0x18, 0x0d55);
9699                         MP_WritePhyUshort(sc, 0x19, 0x1000);
9700                         MP_WritePhyUshort(sc, 0x18, 0x0d65);
9701                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9702                         MP_WritePhyUshort(sc, 0x18, 0x0d75);
9703                         MP_WritePhyUshort(sc, 0x19, 0x8200);
9704                         MP_WritePhyUshort(sc, 0x18, 0x0d85);
9705                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9706                         MP_WritePhyUshort(sc, 0x18, 0x0d95);
9707                         MP_WritePhyUshort(sc, 0x19, 0x7000);
9708                         MP_WritePhyUshort(sc, 0x18, 0x0da5);
9709                         MP_WritePhyUshort(sc, 0x19, 0x0f00);
9710                         MP_WritePhyUshort(sc, 0x18, 0x0db5);
9711                         MP_WritePhyUshort(sc, 0x19, 0x0100);
9712                         MP_WritePhyUshort(sc, 0x18, 0x0dc5);
9713                         MP_WritePhyUshort(sc, 0x19, 0x9b00);
9714                         MP_WritePhyUshort(sc, 0x18, 0x0dd5);
9715                         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9716                         MP_WritePhyUshort(sc, 0x18, 0x0de5);
9717                         MP_WritePhyUshort(sc, 0x19, 0xe000);
9718                         MP_WritePhyUshort(sc, 0x18, 0x0df5);
9719                         MP_WritePhyUshort(sc, 0x19, 0xef00);
9720                         MP_WritePhyUshort(sc, 0x18, 0x16d5);
9721                         MP_WritePhyUshort(sc, 0x19, 0xe200);
9722                         MP_WritePhyUshort(sc, 0x18, 0x16e5);
9723                         MP_WritePhyUshort(sc, 0x19, 0xab00);
9724                         MP_WritePhyUshort(sc, 0x18, 0x2904);
9725                         MP_WritePhyUshort(sc, 0x19, 0x4000);
9726                         MP_WritePhyUshort(sc, 0x18, 0x2914);
9727                         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9728                         MP_WritePhyUshort(sc, 0x18, 0x2924);
9729                         MP_WritePhyUshort(sc, 0x19, 0x0100);
9730                         MP_WritePhyUshort(sc, 0x18, 0x2934);
9731                         MP_WritePhyUshort(sc, 0x19, 0x2000);
9732                         MP_WritePhyUshort(sc, 0x18, 0x2944);
9733                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9734                         MP_WritePhyUshort(sc, 0x18, 0x2954);
9735                         MP_WritePhyUshort(sc, 0x19, 0x4600);
9736                         MP_WritePhyUshort(sc, 0x18, 0x2964);
9737                         MP_WritePhyUshort(sc, 0x19, 0xfc00);
9738                         MP_WritePhyUshort(sc, 0x18, 0x2974);
9739                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9740                         MP_WritePhyUshort(sc, 0x18, 0x2984);
9741                         MP_WritePhyUshort(sc, 0x19, 0x5000);
9742                         MP_WritePhyUshort(sc, 0x18, 0x2994);
9743                         MP_WritePhyUshort(sc, 0x19, 0x9d00);
9744                         MP_WritePhyUshort(sc, 0x18, 0x29a4);
9745                         MP_WritePhyUshort(sc, 0x19, 0xff00);
9746                         MP_WritePhyUshort(sc, 0x18, 0x29b4);
9747                         MP_WritePhyUshort(sc, 0x19, 0x4000);
9748                         MP_WritePhyUshort(sc, 0x18, 0x29c4);
9749                         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9750                         MP_WritePhyUshort(sc, 0x18, 0x29d4);
9751                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9752                         MP_WritePhyUshort(sc, 0x18, 0x29e4);
9753                         MP_WritePhyUshort(sc, 0x19, 0x2000);
9754                         MP_WritePhyUshort(sc, 0x18, 0x29f4);
9755                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9756                         MP_WritePhyUshort(sc, 0x18, 0x2a04);
9757                         MP_WritePhyUshort(sc, 0x19, 0xe600);
9758                         MP_WritePhyUshort(sc, 0x18, 0x2a14);
9759                         MP_WritePhyUshort(sc, 0x19, 0xff00);
9760                         MP_WritePhyUshort(sc, 0x18, 0x2a24);
9761                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9762                         MP_WritePhyUshort(sc, 0x18, 0x2a34);
9763                         MP_WritePhyUshort(sc, 0x19, 0x5000);
9764                         MP_WritePhyUshort(sc, 0x18, 0x2a44);
9765                         MP_WritePhyUshort(sc, 0x19, 0x8500);
9766                         MP_WritePhyUshort(sc, 0x18, 0x2a54);
9767                         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9768                         MP_WritePhyUshort(sc, 0x18, 0x2a64);
9769                         MP_WritePhyUshort(sc, 0x19, 0xac00);
9770                         MP_WritePhyUshort(sc, 0x18, 0x2a74);
9771                         MP_WritePhyUshort(sc, 0x19, 0x0800);
9772                         MP_WritePhyUshort(sc, 0x18, 0x2a84);
9773                         MP_WritePhyUshort(sc, 0x19, 0xfc00);
9774                         MP_WritePhyUshort(sc, 0x18, 0x2a94);
9775                         MP_WritePhyUshort(sc, 0x19, 0xe000);
9776                         MP_WritePhyUshort(sc, 0x18, 0x2aa4);
9777                         MP_WritePhyUshort(sc, 0x19, 0x7400);
9778                         MP_WritePhyUshort(sc, 0x18, 0x2ab4);
9779                         MP_WritePhyUshort(sc, 0x19, 0x4000);
9780                         MP_WritePhyUshort(sc, 0x18, 0x2ac4);
9781                         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9782                         MP_WritePhyUshort(sc, 0x18, 0x2ad4);
9783                         MP_WritePhyUshort(sc, 0x19, 0x0100);
9784                         MP_WritePhyUshort(sc, 0x18, 0x2ae4);
9785                         MP_WritePhyUshort(sc, 0x19, 0xff00);
9786                         MP_WritePhyUshort(sc, 0x18, 0x2af4);
9787                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9788                         MP_WritePhyUshort(sc, 0x18, 0x2b04);
9789                         MP_WritePhyUshort(sc, 0x19, 0x4400);
9790                         MP_WritePhyUshort(sc, 0x18, 0x2b14);
9791                         MP_WritePhyUshort(sc, 0x19, 0xfc00);
9792                         MP_WritePhyUshort(sc, 0x18, 0x2b24);
9793                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9794                         MP_WritePhyUshort(sc, 0x18, 0x2b34);
9795                         MP_WritePhyUshort(sc, 0x19, 0x4000);
9796                         MP_WritePhyUshort(sc, 0x18, 0x2b44);
9797                         MP_WritePhyUshort(sc, 0x19, 0x9d00);
9798                         MP_WritePhyUshort(sc, 0x18, 0x2b54);
9799                         MP_WritePhyUshort(sc, 0x19, 0xff00);
9800                         MP_WritePhyUshort(sc, 0x18, 0x2b64);
9801                         MP_WritePhyUshort(sc, 0x19, 0x4000);
9802                         MP_WritePhyUshort(sc, 0x18, 0x2b74);
9803                         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9804                         MP_WritePhyUshort(sc, 0x18, 0x2b84);
9805                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9806                         MP_WritePhyUshort(sc, 0x18, 0x2b94);
9807                         MP_WritePhyUshort(sc, 0x19, 0xff00);
9808                         MP_WritePhyUshort(sc, 0x18, 0x2ba4);
9809                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9810                         MP_WritePhyUshort(sc, 0x18, 0x2bb4);
9811                         MP_WritePhyUshort(sc, 0x19, 0xfc00);
9812                         MP_WritePhyUshort(sc, 0x18, 0x2bc4);
9813                         MP_WritePhyUshort(sc, 0x19, 0xff00);
9814                         MP_WritePhyUshort(sc, 0x18, 0x2bd4);
9815                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9816                         MP_WritePhyUshort(sc, 0x18, 0x2be4);
9817                         MP_WritePhyUshort(sc, 0x19, 0x4000);
9818                         MP_WritePhyUshort(sc, 0x18, 0x2bf4);
9819                         MP_WritePhyUshort(sc, 0x19, 0x8900);
9820                         MP_WritePhyUshort(sc, 0x18, 0x2c04);
9821                         MP_WritePhyUshort(sc, 0x19, 0x8300);
9822                         MP_WritePhyUshort(sc, 0x18, 0x2c14);
9823                         MP_WritePhyUshort(sc, 0x19, 0xe000);
9824                         MP_WritePhyUshort(sc, 0x18, 0x2c24);
9825                         MP_WritePhyUshort(sc, 0x19, 0x0000);
9826                         MP_WritePhyUshort(sc, 0x18, 0x2c34);
9827                         MP_WritePhyUshort(sc, 0x19, 0xac00);
9828                         MP_WritePhyUshort(sc, 0x18, 0x2c44);
9829                         MP_WritePhyUshort(sc, 0x19, 0x0800);
9830                         MP_WritePhyUshort(sc, 0x18, 0x2c54);
9831                         MP_WritePhyUshort(sc, 0x19, 0xfa00);
9832                         MP_WritePhyUshort(sc, 0x18, 0x2c64);
9833                         MP_WritePhyUshort(sc, 0x19, 0xe100);
9834                         MP_WritePhyUshort(sc, 0x18, 0x2c74);
9835                         MP_WritePhyUshort(sc, 0x19, 0x7f00);
9836                         MP_WritePhyUshort(sc, 0x18, 0x0001);
9837                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
9838                         MP_WritePhyUshort(sc, 0x17, 0x2100);
9839                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
9840                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
9841                         MP_WritePhyUshort(sc, 0x06, 0x0080);
9842                         MP_WritePhyUshort(sc, 0x05, 0x8b88);
9843                         MP_WritePhyUshort(sc, 0x06, 0x0000);
9844                         MP_WritePhyUshort(sc, 0x06, 0x0000);
9845                         MP_WritePhyUshort(sc, 0x06, 0x0000);
9846                         MP_WritePhyUshort(sc, 0x06, 0x0000);
9847                         MP_WritePhyUshort(sc, 0x05, 0x8000);
9848                         MP_WritePhyUshort(sc, 0x06, 0xd480);
9849                         MP_WritePhyUshort(sc, 0x06, 0xc1e4);
9850                         MP_WritePhyUshort(sc, 0x06, 0x8b9a);
9851                         MP_WritePhyUshort(sc, 0x06, 0xe58b);
9852                         MP_WritePhyUshort(sc, 0x06, 0x9bee);
9853                         MP_WritePhyUshort(sc, 0x06, 0x8b83);
9854                         MP_WritePhyUshort(sc, 0x06, 0x41bf);
9855                         MP_WritePhyUshort(sc, 0x06, 0x8b88);
9856                         MP_WritePhyUshort(sc, 0x06, 0xec00);
9857                         MP_WritePhyUshort(sc, 0x06, 0x19a9);
9858                         MP_WritePhyUshort(sc, 0x06, 0x8b90);
9859                         MP_WritePhyUshort(sc, 0x06, 0xf9ee);
9860                         MP_WritePhyUshort(sc, 0x06, 0xfff6);
9861                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
9862                         MP_WritePhyUshort(sc, 0x06, 0xfff7);
9863                         MP_WritePhyUshort(sc, 0x06, 0xffe0);
9864                         MP_WritePhyUshort(sc, 0x06, 0xe140);
9865                         MP_WritePhyUshort(sc, 0x06, 0xe1e1);
9866                         MP_WritePhyUshort(sc, 0x06, 0x41f7);
9867                         MP_WritePhyUshort(sc, 0x06, 0x2ff6);
9868                         MP_WritePhyUshort(sc, 0x06, 0x28e4);
9869                         MP_WritePhyUshort(sc, 0x06, 0xe140);
9870                         MP_WritePhyUshort(sc, 0x06, 0xe5e1);
9871                         MP_WritePhyUshort(sc, 0x06, 0x41f7);
9872                         MP_WritePhyUshort(sc, 0x06, 0x0002);
9873                         MP_WritePhyUshort(sc, 0x06, 0x020c);
9874                         MP_WritePhyUshort(sc, 0x06, 0x0202);
9875                         MP_WritePhyUshort(sc, 0x06, 0x1d02);
9876                         MP_WritePhyUshort(sc, 0x06, 0x0230);
9877                         MP_WritePhyUshort(sc, 0x06, 0x0202);
9878                         MP_WritePhyUshort(sc, 0x06, 0x4002);
9879                         MP_WritePhyUshort(sc, 0x06, 0x028b);
9880                         MP_WritePhyUshort(sc, 0x06, 0x0280);
9881                         MP_WritePhyUshort(sc, 0x06, 0x6c02);
9882                         MP_WritePhyUshort(sc, 0x06, 0x8085);
9883                         MP_WritePhyUshort(sc, 0x06, 0xe08b);
9884                         MP_WritePhyUshort(sc, 0x06, 0x88e1);
9885                         MP_WritePhyUshort(sc, 0x06, 0x8b89);
9886                         MP_WritePhyUshort(sc, 0x06, 0x1e01);
9887                         MP_WritePhyUshort(sc, 0x06, 0xe18b);
9888                         MP_WritePhyUshort(sc, 0x06, 0x8a1e);
9889                         MP_WritePhyUshort(sc, 0x06, 0x01e1);
9890                         MP_WritePhyUshort(sc, 0x06, 0x8b8b);
9891                         MP_WritePhyUshort(sc, 0x06, 0x1e01);
9892                         MP_WritePhyUshort(sc, 0x06, 0xe18b);
9893                         MP_WritePhyUshort(sc, 0x06, 0x8c1e);
9894                         MP_WritePhyUshort(sc, 0x06, 0x01e1);
9895                         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
9896                         MP_WritePhyUshort(sc, 0x06, 0x1e01);
9897                         MP_WritePhyUshort(sc, 0x06, 0xe18b);
9898                         MP_WritePhyUshort(sc, 0x06, 0x8e1e);
9899                         MP_WritePhyUshort(sc, 0x06, 0x01a0);
9900                         MP_WritePhyUshort(sc, 0x06, 0x00c7);
9901                         MP_WritePhyUshort(sc, 0x06, 0xaec3);
9902                         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
9903                         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
9904                         MP_WritePhyUshort(sc, 0x06, 0xad20);
9905                         MP_WritePhyUshort(sc, 0x06, 0x10ee);
9906                         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
9907                         MP_WritePhyUshort(sc, 0x06, 0x0002);
9908                         MP_WritePhyUshort(sc, 0x06, 0x1310);
9909                         MP_WritePhyUshort(sc, 0x06, 0x0280);
9910                         MP_WritePhyUshort(sc, 0x06, 0xc602);
9911                         MP_WritePhyUshort(sc, 0x06, 0x1f0c);
9912                         MP_WritePhyUshort(sc, 0x06, 0x0227);
9913                         MP_WritePhyUshort(sc, 0x06, 0x49fc);
9914                         MP_WritePhyUshort(sc, 0x06, 0x04f8);
9915                         MP_WritePhyUshort(sc, 0x06, 0xe08b);
9916                         MP_WritePhyUshort(sc, 0x06, 0x8ead);
9917                         MP_WritePhyUshort(sc, 0x06, 0x200b);
9918                         MP_WritePhyUshort(sc, 0x06, 0xf620);
9919                         MP_WritePhyUshort(sc, 0x06, 0xe48b);
9920                         MP_WritePhyUshort(sc, 0x06, 0x8e02);
9921                         MP_WritePhyUshort(sc, 0x06, 0x852d);
9922                         MP_WritePhyUshort(sc, 0x06, 0x021b);
9923                         MP_WritePhyUshort(sc, 0x06, 0x67ad);
9924                         MP_WritePhyUshort(sc, 0x06, 0x2211);
9925                         MP_WritePhyUshort(sc, 0x06, 0xf622);
9926                         MP_WritePhyUshort(sc, 0x06, 0xe48b);
9927                         MP_WritePhyUshort(sc, 0x06, 0x8e02);
9928                         MP_WritePhyUshort(sc, 0x06, 0x2ba5);
9929                         MP_WritePhyUshort(sc, 0x06, 0x022a);
9930                         MP_WritePhyUshort(sc, 0x06, 0x2402);
9931                         MP_WritePhyUshort(sc, 0x06, 0x82e5);
9932                         MP_WritePhyUshort(sc, 0x06, 0x022a);
9933                         MP_WritePhyUshort(sc, 0x06, 0xf0ad);
9934                         MP_WritePhyUshort(sc, 0x06, 0x2511);
9935                         MP_WritePhyUshort(sc, 0x06, 0xf625);
9936                         MP_WritePhyUshort(sc, 0x06, 0xe48b);
9937                         MP_WritePhyUshort(sc, 0x06, 0x8e02);
9938                         MP_WritePhyUshort(sc, 0x06, 0x8445);
9939                         MP_WritePhyUshort(sc, 0x06, 0x0204);
9940                         MP_WritePhyUshort(sc, 0x06, 0x0302);
9941                         MP_WritePhyUshort(sc, 0x06, 0x19cc);
9942                         MP_WritePhyUshort(sc, 0x06, 0x022b);
9943                         MP_WritePhyUshort(sc, 0x06, 0x5bfc);
9944                         MP_WritePhyUshort(sc, 0x06, 0x04ee);
9945                         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
9946                         MP_WritePhyUshort(sc, 0x06, 0x0105);
9947                         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
9948                         MP_WritePhyUshort(sc, 0x06, 0xfae0);
9949                         MP_WritePhyUshort(sc, 0x06, 0x8b81);
9950                         MP_WritePhyUshort(sc, 0x06, 0xac26);
9951                         MP_WritePhyUshort(sc, 0x06, 0x08e0);
9952                         MP_WritePhyUshort(sc, 0x06, 0x8b81);
9953                         MP_WritePhyUshort(sc, 0x06, 0xac21);
9954                         MP_WritePhyUshort(sc, 0x06, 0x02ae);
9955                         MP_WritePhyUshort(sc, 0x06, 0x6bee);
9956                         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
9957                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
9958                         MP_WritePhyUshort(sc, 0x06, 0xe0eb);
9959                         MP_WritePhyUshort(sc, 0x06, 0x00e2);
9960                         MP_WritePhyUshort(sc, 0x06, 0xe07c);
9961                         MP_WritePhyUshort(sc, 0x06, 0xe3e0);
9962                         MP_WritePhyUshort(sc, 0x06, 0x7da5);
9963                         MP_WritePhyUshort(sc, 0x06, 0x1111);
9964                         MP_WritePhyUshort(sc, 0x06, 0x15d2);
9965                         MP_WritePhyUshort(sc, 0x06, 0x60d6);
9966                         MP_WritePhyUshort(sc, 0x06, 0x6666);
9967                         MP_WritePhyUshort(sc, 0x06, 0x0207);
9968                         MP_WritePhyUshort(sc, 0x06, 0x6cd2);
9969                         MP_WritePhyUshort(sc, 0x06, 0xa0d6);
9970                         MP_WritePhyUshort(sc, 0x06, 0xaaaa);
9971                         MP_WritePhyUshort(sc, 0x06, 0x0207);
9972                         MP_WritePhyUshort(sc, 0x06, 0x6c02);
9973                         MP_WritePhyUshort(sc, 0x06, 0x201d);
9974                         MP_WritePhyUshort(sc, 0x06, 0xae44);
9975                         MP_WritePhyUshort(sc, 0x06, 0xa566);
9976                         MP_WritePhyUshort(sc, 0x06, 0x6602);
9977                         MP_WritePhyUshort(sc, 0x06, 0xae38);
9978                         MP_WritePhyUshort(sc, 0x06, 0xa5aa);
9979                         MP_WritePhyUshort(sc, 0x06, 0xaa02);
9980                         MP_WritePhyUshort(sc, 0x06, 0xae32);
9981                         MP_WritePhyUshort(sc, 0x06, 0xeee0);
9982                         MP_WritePhyUshort(sc, 0x06, 0xea04);
9983                         MP_WritePhyUshort(sc, 0x06, 0xeee0);
9984                         MP_WritePhyUshort(sc, 0x06, 0xeb06);
9985                         MP_WritePhyUshort(sc, 0x06, 0xe2e0);
9986                         MP_WritePhyUshort(sc, 0x06, 0x7ce3);
9987                         MP_WritePhyUshort(sc, 0x06, 0xe07d);
9988                         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
9989                         MP_WritePhyUshort(sc, 0x06, 0x38e1);
9990                         MP_WritePhyUshort(sc, 0x06, 0xe039);
9991                         MP_WritePhyUshort(sc, 0x06, 0xad2e);
9992                         MP_WritePhyUshort(sc, 0x06, 0x21ad);
9993                         MP_WritePhyUshort(sc, 0x06, 0x3f13);
9994                         MP_WritePhyUshort(sc, 0x06, 0xe0e4);
9995                         MP_WritePhyUshort(sc, 0x06, 0x14e1);
9996                         MP_WritePhyUshort(sc, 0x06, 0xe415);
9997                         MP_WritePhyUshort(sc, 0x06, 0x6880);
9998                         MP_WritePhyUshort(sc, 0x06, 0xe4e4);
9999                         MP_WritePhyUshort(sc, 0x06, 0x14e5);
10000                         MP_WritePhyUshort(sc, 0x06, 0xe415);
10001                         MP_WritePhyUshort(sc, 0x06, 0x0220);
10002                         MP_WritePhyUshort(sc, 0x06, 0x1dae);
10003                         MP_WritePhyUshort(sc, 0x06, 0x0bac);
10004                         MP_WritePhyUshort(sc, 0x06, 0x3e02);
10005                         MP_WritePhyUshort(sc, 0x06, 0xae06);
10006                         MP_WritePhyUshort(sc, 0x06, 0x0281);
10007                         MP_WritePhyUshort(sc, 0x06, 0x4602);
10008                         MP_WritePhyUshort(sc, 0x06, 0x2057);
10009                         MP_WritePhyUshort(sc, 0x06, 0xfefd);
10010                         MP_WritePhyUshort(sc, 0x06, 0xfc04);
10011                         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
10012                         MP_WritePhyUshort(sc, 0x06, 0x8b81);
10013                         MP_WritePhyUshort(sc, 0x06, 0xad26);
10014                         MP_WritePhyUshort(sc, 0x06, 0x0302);
10015                         MP_WritePhyUshort(sc, 0x06, 0x20a7);
10016                         MP_WritePhyUshort(sc, 0x06, 0xe08b);
10017                         MP_WritePhyUshort(sc, 0x06, 0x81ad);
10018                         MP_WritePhyUshort(sc, 0x06, 0x2109);
10019                         MP_WritePhyUshort(sc, 0x06, 0xe08b);
10020                         MP_WritePhyUshort(sc, 0x06, 0x2eac);
10021                         MP_WritePhyUshort(sc, 0x06, 0x2003);
10022                         MP_WritePhyUshort(sc, 0x06, 0x0281);
10023                         MP_WritePhyUshort(sc, 0x06, 0x61fc);
10024                         MP_WritePhyUshort(sc, 0x06, 0x04f8);
10025                         MP_WritePhyUshort(sc, 0x06, 0xe08b);
10026                         MP_WritePhyUshort(sc, 0x06, 0x81ac);
10027                         MP_WritePhyUshort(sc, 0x06, 0x2505);
10028                         MP_WritePhyUshort(sc, 0x06, 0x0222);
10029                         MP_WritePhyUshort(sc, 0x06, 0xaeae);
10030                         MP_WritePhyUshort(sc, 0x06, 0x0302);
10031                         MP_WritePhyUshort(sc, 0x06, 0x8172);
10032                         MP_WritePhyUshort(sc, 0x06, 0xfc04);
10033                         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
10034                         MP_WritePhyUshort(sc, 0x06, 0xfaef);
10035                         MP_WritePhyUshort(sc, 0x06, 0x69fa);
10036                         MP_WritePhyUshort(sc, 0x06, 0xe086);
10037                         MP_WritePhyUshort(sc, 0x06, 0x20a0);
10038                         MP_WritePhyUshort(sc, 0x06, 0x8016);
10039                         MP_WritePhyUshort(sc, 0x06, 0xe086);
10040                         MP_WritePhyUshort(sc, 0x06, 0x21e1);
10041                         MP_WritePhyUshort(sc, 0x06, 0x8b33);
10042                         MP_WritePhyUshort(sc, 0x06, 0x1b10);
10043                         MP_WritePhyUshort(sc, 0x06, 0x9e06);
10044                         MP_WritePhyUshort(sc, 0x06, 0x0223);
10045                         MP_WritePhyUshort(sc, 0x06, 0x91af);
10046                         MP_WritePhyUshort(sc, 0x06, 0x8252);
10047                         MP_WritePhyUshort(sc, 0x06, 0xee86);
10048                         MP_WritePhyUshort(sc, 0x06, 0x2081);
10049                         MP_WritePhyUshort(sc, 0x06, 0xaee4);
10050                         MP_WritePhyUshort(sc, 0x06, 0xa081);
10051                         MP_WritePhyUshort(sc, 0x06, 0x1402);
10052                         MP_WritePhyUshort(sc, 0x06, 0x2399);
10053                         MP_WritePhyUshort(sc, 0x06, 0xbf25);
10054                         MP_WritePhyUshort(sc, 0x06, 0xcc02);
10055                         MP_WritePhyUshort(sc, 0x06, 0x2d21);
10056                         MP_WritePhyUshort(sc, 0x06, 0xee86);
10057                         MP_WritePhyUshort(sc, 0x06, 0x2100);
10058                         MP_WritePhyUshort(sc, 0x06, 0xee86);
10059                         MP_WritePhyUshort(sc, 0x06, 0x2082);
10060                         MP_WritePhyUshort(sc, 0x06, 0xaf82);
10061                         MP_WritePhyUshort(sc, 0x06, 0x52a0);
10062                         MP_WritePhyUshort(sc, 0x06, 0x8232);
10063                         MP_WritePhyUshort(sc, 0x06, 0xe086);
10064                         MP_WritePhyUshort(sc, 0x06, 0x21e1);
10065                         MP_WritePhyUshort(sc, 0x06, 0x8b32);
10066                         MP_WritePhyUshort(sc, 0x06, 0x1b10);
10067                         MP_WritePhyUshort(sc, 0x06, 0x9e06);
10068                         MP_WritePhyUshort(sc, 0x06, 0x0223);
10069                         MP_WritePhyUshort(sc, 0x06, 0x91af);
10070                         MP_WritePhyUshort(sc, 0x06, 0x8252);
10071                         MP_WritePhyUshort(sc, 0x06, 0xee86);
10072                         MP_WritePhyUshort(sc, 0x06, 0x2100);
10073                         MP_WritePhyUshort(sc, 0x06, 0xd000);
10074                         MP_WritePhyUshort(sc, 0x06, 0x0282);
10075                         MP_WritePhyUshort(sc, 0x06, 0x5910);
10076                         MP_WritePhyUshort(sc, 0x06, 0xa004);
10077                         MP_WritePhyUshort(sc, 0x06, 0xf9e0);
10078                         MP_WritePhyUshort(sc, 0x06, 0x861f);
10079                         MP_WritePhyUshort(sc, 0x06, 0xa000);
10080                         MP_WritePhyUshort(sc, 0x06, 0x07ee);
10081                         MP_WritePhyUshort(sc, 0x06, 0x8620);
10082                         MP_WritePhyUshort(sc, 0x06, 0x83af);
10083                         MP_WritePhyUshort(sc, 0x06, 0x8178);
10084                         MP_WritePhyUshort(sc, 0x06, 0x0224);
10085                         MP_WritePhyUshort(sc, 0x06, 0x0102);
10086                         MP_WritePhyUshort(sc, 0x06, 0x2399);
10087                         MP_WritePhyUshort(sc, 0x06, 0xae72);
10088                         MP_WritePhyUshort(sc, 0x06, 0xa083);
10089                         MP_WritePhyUshort(sc, 0x06, 0x4b1f);
10090                         MP_WritePhyUshort(sc, 0x06, 0x55d0);
10091                         MP_WritePhyUshort(sc, 0x06, 0x04bf);
10092                         MP_WritePhyUshort(sc, 0x06, 0x8615);
10093                         MP_WritePhyUshort(sc, 0x06, 0x1a90);
10094                         MP_WritePhyUshort(sc, 0x06, 0x0c54);
10095                         MP_WritePhyUshort(sc, 0x06, 0xd91e);
10096                         MP_WritePhyUshort(sc, 0x06, 0x31b0);
10097                         MP_WritePhyUshort(sc, 0x06, 0xf4e0);
10098                         MP_WritePhyUshort(sc, 0x06, 0xe022);
10099                         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
10100                         MP_WritePhyUshort(sc, 0x06, 0x23ad);
10101                         MP_WritePhyUshort(sc, 0x06, 0x2e0c);
10102                         MP_WritePhyUshort(sc, 0x06, 0xef02);
10103                         MP_WritePhyUshort(sc, 0x06, 0xef12);
10104                         MP_WritePhyUshort(sc, 0x06, 0x0e44);
10105                         MP_WritePhyUshort(sc, 0x06, 0xef23);
10106                         MP_WritePhyUshort(sc, 0x06, 0x0e54);
10107                         MP_WritePhyUshort(sc, 0x06, 0xef21);
10108                         MP_WritePhyUshort(sc, 0x06, 0xe6e4);
10109                         MP_WritePhyUshort(sc, 0x06, 0x2ae7);
10110                         MP_WritePhyUshort(sc, 0x06, 0xe42b);
10111                         MP_WritePhyUshort(sc, 0x06, 0xe2e4);
10112                         MP_WritePhyUshort(sc, 0x06, 0x28e3);
10113                         MP_WritePhyUshort(sc, 0x06, 0xe429);
10114                         MP_WritePhyUshort(sc, 0x06, 0x6d20);
10115                         MP_WritePhyUshort(sc, 0x06, 0x00e6);
10116                         MP_WritePhyUshort(sc, 0x06, 0xe428);
10117                         MP_WritePhyUshort(sc, 0x06, 0xe7e4);
10118                         MP_WritePhyUshort(sc, 0x06, 0x29bf);
10119                         MP_WritePhyUshort(sc, 0x06, 0x25ca);
10120                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10121                         MP_WritePhyUshort(sc, 0x06, 0x21ee);
10122                         MP_WritePhyUshort(sc, 0x06, 0x8620);
10123                         MP_WritePhyUshort(sc, 0x06, 0x84ee);
10124                         MP_WritePhyUshort(sc, 0x06, 0x8621);
10125                         MP_WritePhyUshort(sc, 0x06, 0x00af);
10126                         MP_WritePhyUshort(sc, 0x06, 0x8178);
10127                         MP_WritePhyUshort(sc, 0x06, 0xa084);
10128                         MP_WritePhyUshort(sc, 0x06, 0x19e0);
10129                         MP_WritePhyUshort(sc, 0x06, 0x8621);
10130                         MP_WritePhyUshort(sc, 0x06, 0xe18b);
10131                         MP_WritePhyUshort(sc, 0x06, 0x341b);
10132                         MP_WritePhyUshort(sc, 0x06, 0x109e);
10133                         MP_WritePhyUshort(sc, 0x06, 0x0602);
10134                         MP_WritePhyUshort(sc, 0x06, 0x2391);
10135                         MP_WritePhyUshort(sc, 0x06, 0xaf82);
10136                         MP_WritePhyUshort(sc, 0x06, 0x5202);
10137                         MP_WritePhyUshort(sc, 0x06, 0x241f);
10138                         MP_WritePhyUshort(sc, 0x06, 0xee86);
10139                         MP_WritePhyUshort(sc, 0x06, 0x2085);
10140                         MP_WritePhyUshort(sc, 0x06, 0xae08);
10141                         MP_WritePhyUshort(sc, 0x06, 0xa085);
10142                         MP_WritePhyUshort(sc, 0x06, 0x02ae);
10143                         MP_WritePhyUshort(sc, 0x06, 0x0302);
10144                         MP_WritePhyUshort(sc, 0x06, 0x2442);
10145                         MP_WritePhyUshort(sc, 0x06, 0xfeef);
10146                         MP_WritePhyUshort(sc, 0x06, 0x96fe);
10147                         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
10148                         MP_WritePhyUshort(sc, 0x06, 0x04f8);
10149                         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
10150                         MP_WritePhyUshort(sc, 0x06, 0xef69);
10151                         MP_WritePhyUshort(sc, 0x06, 0xfad1);
10152                         MP_WritePhyUshort(sc, 0x06, 0x801f);
10153                         MP_WritePhyUshort(sc, 0x06, 0x66e2);
10154                         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
10155                         MP_WritePhyUshort(sc, 0x06, 0xe3e0);
10156                         MP_WritePhyUshort(sc, 0x06, 0xeb5a);
10157                         MP_WritePhyUshort(sc, 0x06, 0xf81e);
10158                         MP_WritePhyUshort(sc, 0x06, 0x20e6);
10159                         MP_WritePhyUshort(sc, 0x06, 0xe0ea);
10160                         MP_WritePhyUshort(sc, 0x06, 0xe5e0);
10161                         MP_WritePhyUshort(sc, 0x06, 0xebd3);
10162                         MP_WritePhyUshort(sc, 0x06, 0x05b3);
10163                         MP_WritePhyUshort(sc, 0x06, 0xfee2);
10164                         MP_WritePhyUshort(sc, 0x06, 0xe07c);
10165                         MP_WritePhyUshort(sc, 0x06, 0xe3e0);
10166                         MP_WritePhyUshort(sc, 0x06, 0x7dad);
10167                         MP_WritePhyUshort(sc, 0x06, 0x3703);
10168                         MP_WritePhyUshort(sc, 0x06, 0x7dff);
10169                         MP_WritePhyUshort(sc, 0x06, 0xff0d);
10170                         MP_WritePhyUshort(sc, 0x06, 0x581c);
10171                         MP_WritePhyUshort(sc, 0x06, 0x55f8);
10172                         MP_WritePhyUshort(sc, 0x06, 0xef46);
10173                         MP_WritePhyUshort(sc, 0x06, 0x0282);
10174                         MP_WritePhyUshort(sc, 0x06, 0xc7ef);
10175                         MP_WritePhyUshort(sc, 0x06, 0x65ef);
10176                         MP_WritePhyUshort(sc, 0x06, 0x54fc);
10177                         MP_WritePhyUshort(sc, 0x06, 0xac30);
10178                         MP_WritePhyUshort(sc, 0x06, 0x2b11);
10179                         MP_WritePhyUshort(sc, 0x06, 0xa188);
10180                         MP_WritePhyUshort(sc, 0x06, 0xcabf);
10181                         MP_WritePhyUshort(sc, 0x06, 0x860e);
10182                         MP_WritePhyUshort(sc, 0x06, 0xef10);
10183                         MP_WritePhyUshort(sc, 0x06, 0x0c11);
10184                         MP_WritePhyUshort(sc, 0x06, 0x1a91);
10185                         MP_WritePhyUshort(sc, 0x06, 0xda19);
10186                         MP_WritePhyUshort(sc, 0x06, 0xdbf8);
10187                         MP_WritePhyUshort(sc, 0x06, 0xef46);
10188                         MP_WritePhyUshort(sc, 0x06, 0x021e);
10189                         MP_WritePhyUshort(sc, 0x06, 0x17ef);
10190                         MP_WritePhyUshort(sc, 0x06, 0x54fc);
10191                         MP_WritePhyUshort(sc, 0x06, 0xad30);
10192                         MP_WritePhyUshort(sc, 0x06, 0x0fef);
10193                         MP_WritePhyUshort(sc, 0x06, 0x5689);
10194                         MP_WritePhyUshort(sc, 0x06, 0xde19);
10195                         MP_WritePhyUshort(sc, 0x06, 0xdfe2);
10196                         MP_WritePhyUshort(sc, 0x06, 0x861f);
10197                         MP_WritePhyUshort(sc, 0x06, 0xbf86);
10198                         MP_WritePhyUshort(sc, 0x06, 0x161a);
10199                         MP_WritePhyUshort(sc, 0x06, 0x90de);
10200                         MP_WritePhyUshort(sc, 0x06, 0xfeef);
10201                         MP_WritePhyUshort(sc, 0x06, 0x96fe);
10202                         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
10203                         MP_WritePhyUshort(sc, 0x06, 0x04ac);
10204                         MP_WritePhyUshort(sc, 0x06, 0x2707);
10205                         MP_WritePhyUshort(sc, 0x06, 0xac37);
10206                         MP_WritePhyUshort(sc, 0x06, 0x071a);
10207                         MP_WritePhyUshort(sc, 0x06, 0x54ae);
10208                         MP_WritePhyUshort(sc, 0x06, 0x11ac);
10209                         MP_WritePhyUshort(sc, 0x06, 0x3707);
10210                         MP_WritePhyUshort(sc, 0x06, 0xae00);
10211                         MP_WritePhyUshort(sc, 0x06, 0x1a54);
10212                         MP_WritePhyUshort(sc, 0x06, 0xac37);
10213                         MP_WritePhyUshort(sc, 0x06, 0x07d0);
10214                         MP_WritePhyUshort(sc, 0x06, 0x01d5);
10215                         MP_WritePhyUshort(sc, 0x06, 0xffff);
10216                         MP_WritePhyUshort(sc, 0x06, 0xae02);
10217                         MP_WritePhyUshort(sc, 0x06, 0xd000);
10218                         MP_WritePhyUshort(sc, 0x06, 0x04f8);
10219                         MP_WritePhyUshort(sc, 0x06, 0xe08b);
10220                         MP_WritePhyUshort(sc, 0x06, 0x83ad);
10221                         MP_WritePhyUshort(sc, 0x06, 0x2444);
10222                         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
10223                         MP_WritePhyUshort(sc, 0x06, 0x22e1);
10224                         MP_WritePhyUshort(sc, 0x06, 0xe023);
10225                         MP_WritePhyUshort(sc, 0x06, 0xad22);
10226                         MP_WritePhyUshort(sc, 0x06, 0x3be0);
10227                         MP_WritePhyUshort(sc, 0x06, 0x8abe);
10228                         MP_WritePhyUshort(sc, 0x06, 0xa000);
10229                         MP_WritePhyUshort(sc, 0x06, 0x0502);
10230                         MP_WritePhyUshort(sc, 0x06, 0x28de);
10231                         MP_WritePhyUshort(sc, 0x06, 0xae42);
10232                         MP_WritePhyUshort(sc, 0x06, 0xa001);
10233                         MP_WritePhyUshort(sc, 0x06, 0x0502);
10234                         MP_WritePhyUshort(sc, 0x06, 0x28f1);
10235                         MP_WritePhyUshort(sc, 0x06, 0xae3a);
10236                         MP_WritePhyUshort(sc, 0x06, 0xa002);
10237                         MP_WritePhyUshort(sc, 0x06, 0x0502);
10238                         MP_WritePhyUshort(sc, 0x06, 0x8344);
10239                         MP_WritePhyUshort(sc, 0x06, 0xae32);
10240                         MP_WritePhyUshort(sc, 0x06, 0xa003);
10241                         MP_WritePhyUshort(sc, 0x06, 0x0502);
10242                         MP_WritePhyUshort(sc, 0x06, 0x299a);
10243                         MP_WritePhyUshort(sc, 0x06, 0xae2a);
10244                         MP_WritePhyUshort(sc, 0x06, 0xa004);
10245                         MP_WritePhyUshort(sc, 0x06, 0x0502);
10246                         MP_WritePhyUshort(sc, 0x06, 0x29ae);
10247                         MP_WritePhyUshort(sc, 0x06, 0xae22);
10248                         MP_WritePhyUshort(sc, 0x06, 0xa005);
10249                         MP_WritePhyUshort(sc, 0x06, 0x0502);
10250                         MP_WritePhyUshort(sc, 0x06, 0x29d7);
10251                         MP_WritePhyUshort(sc, 0x06, 0xae1a);
10252                         MP_WritePhyUshort(sc, 0x06, 0xa006);
10253                         MP_WritePhyUshort(sc, 0x06, 0x0502);
10254                         MP_WritePhyUshort(sc, 0x06, 0x29fe);
10255                         MP_WritePhyUshort(sc, 0x06, 0xae12);
10256                         MP_WritePhyUshort(sc, 0x06, 0xee8a);
10257                         MP_WritePhyUshort(sc, 0x06, 0xc000);
10258                         MP_WritePhyUshort(sc, 0x06, 0xee8a);
10259                         MP_WritePhyUshort(sc, 0x06, 0xc100);
10260                         MP_WritePhyUshort(sc, 0x06, 0xee8a);
10261                         MP_WritePhyUshort(sc, 0x06, 0xc600);
10262                         MP_WritePhyUshort(sc, 0x06, 0xee8a);
10263                         MP_WritePhyUshort(sc, 0x06, 0xbe00);
10264                         MP_WritePhyUshort(sc, 0x06, 0xae00);
10265                         MP_WritePhyUshort(sc, 0x06, 0xfc04);
10266                         MP_WritePhyUshort(sc, 0x06, 0xf802);
10267                         MP_WritePhyUshort(sc, 0x06, 0x2a67);
10268                         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
10269                         MP_WritePhyUshort(sc, 0x06, 0x22e1);
10270                         MP_WritePhyUshort(sc, 0x06, 0xe023);
10271                         MP_WritePhyUshort(sc, 0x06, 0x0d06);
10272                         MP_WritePhyUshort(sc, 0x06, 0x5803);
10273                         MP_WritePhyUshort(sc, 0x06, 0xa002);
10274                         MP_WritePhyUshort(sc, 0x06, 0x02ae);
10275                         MP_WritePhyUshort(sc, 0x06, 0x2da0);
10276                         MP_WritePhyUshort(sc, 0x06, 0x0102);
10277                         MP_WritePhyUshort(sc, 0x06, 0xae2d);
10278                         MP_WritePhyUshort(sc, 0x06, 0xa000);
10279                         MP_WritePhyUshort(sc, 0x06, 0x4de0);
10280                         MP_WritePhyUshort(sc, 0x06, 0xe200);
10281                         MP_WritePhyUshort(sc, 0x06, 0xe1e2);
10282                         MP_WritePhyUshort(sc, 0x06, 0x01ad);
10283                         MP_WritePhyUshort(sc, 0x06, 0x2444);
10284                         MP_WritePhyUshort(sc, 0x06, 0xe08a);
10285                         MP_WritePhyUshort(sc, 0x06, 0xc2e4);
10286                         MP_WritePhyUshort(sc, 0x06, 0x8ac4);
10287                         MP_WritePhyUshort(sc, 0x06, 0xe08a);
10288                         MP_WritePhyUshort(sc, 0x06, 0xc3e4);
10289                         MP_WritePhyUshort(sc, 0x06, 0x8ac5);
10290                         MP_WritePhyUshort(sc, 0x06, 0xee8a);
10291                         MP_WritePhyUshort(sc, 0x06, 0xbe03);
10292                         MP_WritePhyUshort(sc, 0x06, 0xe08b);
10293                         MP_WritePhyUshort(sc, 0x06, 0x83ad);
10294                         MP_WritePhyUshort(sc, 0x06, 0x253a);
10295                         MP_WritePhyUshort(sc, 0x06, 0xee8a);
10296                         MP_WritePhyUshort(sc, 0x06, 0xbe05);
10297                         MP_WritePhyUshort(sc, 0x06, 0xae34);
10298                         MP_WritePhyUshort(sc, 0x06, 0xe08a);
10299                         MP_WritePhyUshort(sc, 0x06, 0xceae);
10300                         MP_WritePhyUshort(sc, 0x06, 0x03e0);
10301                         MP_WritePhyUshort(sc, 0x06, 0x8acf);
10302                         MP_WritePhyUshort(sc, 0x06, 0xe18a);
10303                         MP_WritePhyUshort(sc, 0x06, 0xc249);
10304                         MP_WritePhyUshort(sc, 0x06, 0x05e5);
10305                         MP_WritePhyUshort(sc, 0x06, 0x8ac4);
10306                         MP_WritePhyUshort(sc, 0x06, 0xe18a);
10307                         MP_WritePhyUshort(sc, 0x06, 0xc349);
10308                         MP_WritePhyUshort(sc, 0x06, 0x05e5);
10309                         MP_WritePhyUshort(sc, 0x06, 0x8ac5);
10310                         MP_WritePhyUshort(sc, 0x06, 0xee8a);
10311                         MP_WritePhyUshort(sc, 0x06, 0xbe05);
10312                         MP_WritePhyUshort(sc, 0x06, 0x022a);
10313                         MP_WritePhyUshort(sc, 0x06, 0xb6ac);
10314                         MP_WritePhyUshort(sc, 0x06, 0x2012);
10315                         MP_WritePhyUshort(sc, 0x06, 0x0283);
10316                         MP_WritePhyUshort(sc, 0x06, 0xbaac);
10317                         MP_WritePhyUshort(sc, 0x06, 0x200c);
10318                         MP_WritePhyUshort(sc, 0x06, 0xee8a);
10319                         MP_WritePhyUshort(sc, 0x06, 0xc100);
10320                         MP_WritePhyUshort(sc, 0x06, 0xee8a);
10321                         MP_WritePhyUshort(sc, 0x06, 0xc600);
10322                         MP_WritePhyUshort(sc, 0x06, 0xee8a);
10323                         MP_WritePhyUshort(sc, 0x06, 0xbe02);
10324                         MP_WritePhyUshort(sc, 0x06, 0xfc04);
10325                         MP_WritePhyUshort(sc, 0x06, 0xd000);
10326                         MP_WritePhyUshort(sc, 0x06, 0x0283);
10327                         MP_WritePhyUshort(sc, 0x06, 0xcc59);
10328                         MP_WritePhyUshort(sc, 0x06, 0x0f39);
10329                         MP_WritePhyUshort(sc, 0x06, 0x02aa);
10330                         MP_WritePhyUshort(sc, 0x06, 0x04d0);
10331                         MP_WritePhyUshort(sc, 0x06, 0x01ae);
10332                         MP_WritePhyUshort(sc, 0x06, 0x02d0);
10333                         MP_WritePhyUshort(sc, 0x06, 0x0004);
10334                         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
10335                         MP_WritePhyUshort(sc, 0x06, 0xe2e2);
10336                         MP_WritePhyUshort(sc, 0x06, 0xd2e3);
10337                         MP_WritePhyUshort(sc, 0x06, 0xe2d3);
10338                         MP_WritePhyUshort(sc, 0x06, 0xf95a);
10339                         MP_WritePhyUshort(sc, 0x06, 0xf7e6);
10340                         MP_WritePhyUshort(sc, 0x06, 0xe2d2);
10341                         MP_WritePhyUshort(sc, 0x06, 0xe7e2);
10342                         MP_WritePhyUshort(sc, 0x06, 0xd3e2);
10343                         MP_WritePhyUshort(sc, 0x06, 0xe02c);
10344                         MP_WritePhyUshort(sc, 0x06, 0xe3e0);
10345                         MP_WritePhyUshort(sc, 0x06, 0x2df9);
10346                         MP_WritePhyUshort(sc, 0x06, 0x5be0);
10347                         MP_WritePhyUshort(sc, 0x06, 0x1e30);
10348                         MP_WritePhyUshort(sc, 0x06, 0xe6e0);
10349                         MP_WritePhyUshort(sc, 0x06, 0x2ce7);
10350                         MP_WritePhyUshort(sc, 0x06, 0xe02d);
10351                         MP_WritePhyUshort(sc, 0x06, 0xe2e2);
10352                         MP_WritePhyUshort(sc, 0x06, 0xcce3);
10353                         MP_WritePhyUshort(sc, 0x06, 0xe2cd);
10354                         MP_WritePhyUshort(sc, 0x06, 0xf95a);
10355                         MP_WritePhyUshort(sc, 0x06, 0x0f6a);
10356                         MP_WritePhyUshort(sc, 0x06, 0x50e6);
10357                         MP_WritePhyUshort(sc, 0x06, 0xe2cc);
10358                         MP_WritePhyUshort(sc, 0x06, 0xe7e2);
10359                         MP_WritePhyUshort(sc, 0x06, 0xcde0);
10360                         MP_WritePhyUshort(sc, 0x06, 0xe03c);
10361                         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
10362                         MP_WritePhyUshort(sc, 0x06, 0x3def);
10363                         MP_WritePhyUshort(sc, 0x06, 0x64fd);
10364                         MP_WritePhyUshort(sc, 0x06, 0xe0e2);
10365                         MP_WritePhyUshort(sc, 0x06, 0xcce1);
10366                         MP_WritePhyUshort(sc, 0x06, 0xe2cd);
10367                         MP_WritePhyUshort(sc, 0x06, 0x580f);
10368                         MP_WritePhyUshort(sc, 0x06, 0x5af0);
10369                         MP_WritePhyUshort(sc, 0x06, 0x1e02);
10370                         MP_WritePhyUshort(sc, 0x06, 0xe4e2);
10371                         MP_WritePhyUshort(sc, 0x06, 0xcce5);
10372                         MP_WritePhyUshort(sc, 0x06, 0xe2cd);
10373                         MP_WritePhyUshort(sc, 0x06, 0xfde0);
10374                         MP_WritePhyUshort(sc, 0x06, 0xe02c);
10375                         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
10376                         MP_WritePhyUshort(sc, 0x06, 0x2d59);
10377                         MP_WritePhyUshort(sc, 0x06, 0xe05b);
10378                         MP_WritePhyUshort(sc, 0x06, 0x1f1e);
10379                         MP_WritePhyUshort(sc, 0x06, 0x13e4);
10380                         MP_WritePhyUshort(sc, 0x06, 0xe02c);
10381                         MP_WritePhyUshort(sc, 0x06, 0xe5e0);
10382                         MP_WritePhyUshort(sc, 0x06, 0x2dfd);
10383                         MP_WritePhyUshort(sc, 0x06, 0xe0e2);
10384                         MP_WritePhyUshort(sc, 0x06, 0xd2e1);
10385                         MP_WritePhyUshort(sc, 0x06, 0xe2d3);
10386                         MP_WritePhyUshort(sc, 0x06, 0x58f7);
10387                         MP_WritePhyUshort(sc, 0x06, 0x5a08);
10388                         MP_WritePhyUshort(sc, 0x06, 0x1e02);
10389                         MP_WritePhyUshort(sc, 0x06, 0xe4e2);
10390                         MP_WritePhyUshort(sc, 0x06, 0xd2e5);
10391                         MP_WritePhyUshort(sc, 0x06, 0xe2d3);
10392                         MP_WritePhyUshort(sc, 0x06, 0xef46);
10393                         MP_WritePhyUshort(sc, 0x06, 0xfefd);
10394                         MP_WritePhyUshort(sc, 0x06, 0x04f8);
10395                         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
10396                         MP_WritePhyUshort(sc, 0x06, 0xef69);
10397                         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
10398                         MP_WritePhyUshort(sc, 0x06, 0x22e1);
10399                         MP_WritePhyUshort(sc, 0x06, 0xe023);
10400                         MP_WritePhyUshort(sc, 0x06, 0x58c4);
10401                         MP_WritePhyUshort(sc, 0x06, 0xe18b);
10402                         MP_WritePhyUshort(sc, 0x06, 0x6e1f);
10403                         MP_WritePhyUshort(sc, 0x06, 0x109e);
10404                         MP_WritePhyUshort(sc, 0x06, 0x58e4);
10405                         MP_WritePhyUshort(sc, 0x06, 0x8b6e);
10406                         MP_WritePhyUshort(sc, 0x06, 0xad22);
10407                         MP_WritePhyUshort(sc, 0x06, 0x22ac);
10408                         MP_WritePhyUshort(sc, 0x06, 0x2755);
10409                         MP_WritePhyUshort(sc, 0x06, 0xac26);
10410                         MP_WritePhyUshort(sc, 0x06, 0x02ae);
10411                         MP_WritePhyUshort(sc, 0x06, 0x1ad1);
10412                         MP_WritePhyUshort(sc, 0x06, 0x06bf);
10413                         MP_WritePhyUshort(sc, 0x06, 0x3bba);
10414                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10415                         MP_WritePhyUshort(sc, 0x06, 0xc1d1);
10416                         MP_WritePhyUshort(sc, 0x06, 0x07bf);
10417                         MP_WritePhyUshort(sc, 0x06, 0x3bbd);
10418                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10419                         MP_WritePhyUshort(sc, 0x06, 0xc1d1);
10420                         MP_WritePhyUshort(sc, 0x06, 0x07bf);
10421                         MP_WritePhyUshort(sc, 0x06, 0x3bc0);
10422                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10423                         MP_WritePhyUshort(sc, 0x06, 0xc1ae);
10424                         MP_WritePhyUshort(sc, 0x06, 0x30d1);
10425                         MP_WritePhyUshort(sc, 0x06, 0x03bf);
10426                         MP_WritePhyUshort(sc, 0x06, 0x3bc3);
10427                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10428                         MP_WritePhyUshort(sc, 0x06, 0xc1d1);
10429                         MP_WritePhyUshort(sc, 0x06, 0x00bf);
10430                         MP_WritePhyUshort(sc, 0x06, 0x3bc6);
10431                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10432                         MP_WritePhyUshort(sc, 0x06, 0xc1d1);
10433                         MP_WritePhyUshort(sc, 0x06, 0x00bf);
10434                         MP_WritePhyUshort(sc, 0x06, 0x84e9);
10435                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10436                         MP_WritePhyUshort(sc, 0x06, 0xc1d1);
10437                         MP_WritePhyUshort(sc, 0x06, 0x0fbf);
10438                         MP_WritePhyUshort(sc, 0x06, 0x3bba);
10439                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10440                         MP_WritePhyUshort(sc, 0x06, 0xc1d1);
10441                         MP_WritePhyUshort(sc, 0x06, 0x01bf);
10442                         MP_WritePhyUshort(sc, 0x06, 0x3bbd);
10443                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10444                         MP_WritePhyUshort(sc, 0x06, 0xc1d1);
10445                         MP_WritePhyUshort(sc, 0x06, 0x01bf);
10446                         MP_WritePhyUshort(sc, 0x06, 0x3bc0);
10447                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10448                         MP_WritePhyUshort(sc, 0x06, 0xc1ef);
10449                         MP_WritePhyUshort(sc, 0x06, 0x96fe);
10450                         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
10451                         MP_WritePhyUshort(sc, 0x06, 0x04d1);
10452                         MP_WritePhyUshort(sc, 0x06, 0x00bf);
10453                         MP_WritePhyUshort(sc, 0x06, 0x3bc3);
10454                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10455                         MP_WritePhyUshort(sc, 0x06, 0xc1d0);
10456                         MP_WritePhyUshort(sc, 0x06, 0x1102);
10457                         MP_WritePhyUshort(sc, 0x06, 0x2bfb);
10458                         MP_WritePhyUshort(sc, 0x06, 0x5903);
10459                         MP_WritePhyUshort(sc, 0x06, 0xef01);
10460                         MP_WritePhyUshort(sc, 0x06, 0xd100);
10461                         MP_WritePhyUshort(sc, 0x06, 0xa000);
10462                         MP_WritePhyUshort(sc, 0x06, 0x02d1);
10463                         MP_WritePhyUshort(sc, 0x06, 0x01bf);
10464                         MP_WritePhyUshort(sc, 0x06, 0x3bc6);
10465                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10466                         MP_WritePhyUshort(sc, 0x06, 0xc1d1);
10467                         MP_WritePhyUshort(sc, 0x06, 0x11ad);
10468                         MP_WritePhyUshort(sc, 0x06, 0x2002);
10469                         MP_WritePhyUshort(sc, 0x06, 0x0c11);
10470                         MP_WritePhyUshort(sc, 0x06, 0xad21);
10471                         MP_WritePhyUshort(sc, 0x06, 0x020c);
10472                         MP_WritePhyUshort(sc, 0x06, 0x12bf);
10473                         MP_WritePhyUshort(sc, 0x06, 0x84e9);
10474                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10475                         MP_WritePhyUshort(sc, 0x06, 0xc1ae);
10476                         MP_WritePhyUshort(sc, 0x06, 0xc870);
10477                         MP_WritePhyUshort(sc, 0x06, 0xe426);
10478                         MP_WritePhyUshort(sc, 0x06, 0x0284);
10479                         MP_WritePhyUshort(sc, 0x06, 0xf005);
10480                         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
10481                         MP_WritePhyUshort(sc, 0x06, 0xef69);
10482                         MP_WritePhyUshort(sc, 0x06, 0xe0e2);
10483                         MP_WritePhyUshort(sc, 0x06, 0xfee1);
10484                         MP_WritePhyUshort(sc, 0x06, 0xe2ff);
10485                         MP_WritePhyUshort(sc, 0x06, 0xad2d);
10486                         MP_WritePhyUshort(sc, 0x06, 0x1ae0);
10487                         MP_WritePhyUshort(sc, 0x06, 0xe14e);
10488                         MP_WritePhyUshort(sc, 0x06, 0xe1e1);
10489                         MP_WritePhyUshort(sc, 0x06, 0x4fac);
10490                         MP_WritePhyUshort(sc, 0x06, 0x2d22);
10491                         MP_WritePhyUshort(sc, 0x06, 0xf603);
10492                         MP_WritePhyUshort(sc, 0x06, 0x0203);
10493                         MP_WritePhyUshort(sc, 0x06, 0x3bf7);
10494                         MP_WritePhyUshort(sc, 0x06, 0x03f7);
10495                         MP_WritePhyUshort(sc, 0x06, 0x06bf);
10496                         MP_WritePhyUshort(sc, 0x06, 0x85c4);
10497                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10498                         MP_WritePhyUshort(sc, 0x06, 0x21ae);
10499                         MP_WritePhyUshort(sc, 0x06, 0x11e0);
10500                         MP_WritePhyUshort(sc, 0x06, 0xe14e);
10501                         MP_WritePhyUshort(sc, 0x06, 0xe1e1);
10502                         MP_WritePhyUshort(sc, 0x06, 0x4fad);
10503                         MP_WritePhyUshort(sc, 0x06, 0x2d08);
10504                         MP_WritePhyUshort(sc, 0x06, 0xbf85);
10505                         MP_WritePhyUshort(sc, 0x06, 0xcf02);
10506                         MP_WritePhyUshort(sc, 0x06, 0x2d21);
10507                         MP_WritePhyUshort(sc, 0x06, 0xf606);
10508                         MP_WritePhyUshort(sc, 0x06, 0xef96);
10509                         MP_WritePhyUshort(sc, 0x06, 0xfefc);
10510                         MP_WritePhyUshort(sc, 0x06, 0x04f8);
10511                         MP_WritePhyUshort(sc, 0x06, 0xfaef);
10512                         MP_WritePhyUshort(sc, 0x06, 0x6902);
10513                         MP_WritePhyUshort(sc, 0x06, 0x8561);
10514                         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
10515                         MP_WritePhyUshort(sc, 0x06, 0x00e1);
10516                         MP_WritePhyUshort(sc, 0x06, 0xe001);
10517                         MP_WritePhyUshort(sc, 0x06, 0xad27);
10518                         MP_WritePhyUshort(sc, 0x06, 0x1fd1);
10519                         MP_WritePhyUshort(sc, 0x06, 0x01bf);
10520                         MP_WritePhyUshort(sc, 0x06, 0x85be);
10521                         MP_WritePhyUshort(sc, 0x06, 0x022d);
10522                         MP_WritePhyUshort(sc, 0x06, 0xc1e0);
10523                         MP_WritePhyUshort(sc, 0x06, 0xe020);
10524                         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
10525                         MP_WritePhyUshort(sc, 0x06, 0x21ad);
10526                         MP_WritePhyUshort(sc, 0x06, 0x200e);
10527                         MP_WritePhyUshort(sc, 0x06, 0xd100);
10528                         MP_WritePhyUshort(sc, 0x06, 0xbf85);
10529                         MP_WritePhyUshort(sc, 0x06, 0xbe02);
10530                         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10531                         MP_WritePhyUshort(sc, 0x06, 0xbf3b);
10532                         MP_WritePhyUshort(sc, 0x06, 0x9602);
10533                         MP_WritePhyUshort(sc, 0x06, 0x2d21);
10534                         MP_WritePhyUshort(sc, 0x06, 0xef96);
10535                         MP_WritePhyUshort(sc, 0x06, 0xfefc);
10536                         MP_WritePhyUshort(sc, 0x06, 0x04f8);
10537                         MP_WritePhyUshort(sc, 0x06, 0xf9fa);
10538                         MP_WritePhyUshort(sc, 0x06, 0xef69);
10539                         MP_WritePhyUshort(sc, 0x06, 0xe08b);
10540                         MP_WritePhyUshort(sc, 0x06, 0x87ad);
10541                         MP_WritePhyUshort(sc, 0x06, 0x204c);
10542                         MP_WritePhyUshort(sc, 0x06, 0xd200);
10543                         MP_WritePhyUshort(sc, 0x06, 0xe0e2);
10544                         MP_WritePhyUshort(sc, 0x06, 0x0058);
10545                         MP_WritePhyUshort(sc, 0x06, 0x010c);
10546                         MP_WritePhyUshort(sc, 0x06, 0x021e);
10547                         MP_WritePhyUshort(sc, 0x06, 0x20e0);
10548                         MP_WritePhyUshort(sc, 0x06, 0xe000);
10549                         MP_WritePhyUshort(sc, 0x06, 0x5810);
10550                         MP_WritePhyUshort(sc, 0x06, 0x1e20);
10551                         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
10552                         MP_WritePhyUshort(sc, 0x06, 0x3658);
10553                         MP_WritePhyUshort(sc, 0x06, 0x031e);
10554                         MP_WritePhyUshort(sc, 0x06, 0x20e0);
10555                         MP_WritePhyUshort(sc, 0x06, 0xe022);
10556                         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
10557                         MP_WritePhyUshort(sc, 0x06, 0x2358);
10558                         MP_WritePhyUshort(sc, 0x06, 0xe01e);
10559                         MP_WritePhyUshort(sc, 0x06, 0x20e0);
10560                         MP_WritePhyUshort(sc, 0x06, 0x8b64);
10561                         MP_WritePhyUshort(sc, 0x06, 0x1f02);
10562                         MP_WritePhyUshort(sc, 0x06, 0x9e22);
10563                         MP_WritePhyUshort(sc, 0x06, 0xe68b);
10564                         MP_WritePhyUshort(sc, 0x06, 0x64ad);
10565                         MP_WritePhyUshort(sc, 0x06, 0x3214);
10566                         MP_WritePhyUshort(sc, 0x06, 0xad34);
10567                         MP_WritePhyUshort(sc, 0x06, 0x11ef);
10568                         MP_WritePhyUshort(sc, 0x06, 0x0258);
10569                         MP_WritePhyUshort(sc, 0x06, 0x039e);
10570                         MP_WritePhyUshort(sc, 0x06, 0x07ad);
10571                         MP_WritePhyUshort(sc, 0x06, 0x3508);
10572                         MP_WritePhyUshort(sc, 0x06, 0x5ac0);
10573                         MP_WritePhyUshort(sc, 0x06, 0x9f04);
10574                         MP_WritePhyUshort(sc, 0x06, 0xd101);
10575                         MP_WritePhyUshort(sc, 0x06, 0xae02);
10576                         MP_WritePhyUshort(sc, 0x06, 0xd100);
10577                         MP_WritePhyUshort(sc, 0x06, 0xbf85);
10578                         MP_WritePhyUshort(sc, 0x06, 0xc102);
10579                         MP_WritePhyUshort(sc, 0x06, 0x2dc1);
10580                         MP_WritePhyUshort(sc, 0x06, 0xef96);
10581                         MP_WritePhyUshort(sc, 0x06, 0xfefd);
10582                         MP_WritePhyUshort(sc, 0x06, 0xfc04);
10583                         MP_WritePhyUshort(sc, 0x06, 0x00e2);
10584                         MP_WritePhyUshort(sc, 0x06, 0x34cc);
10585                         MP_WritePhyUshort(sc, 0x06, 0xe200);
10586                         MP_WritePhyUshort(sc, 0x06, 0xa725);
10587                         MP_WritePhyUshort(sc, 0x06, 0xe50a);
10588                         MP_WritePhyUshort(sc, 0x06, 0x1de5);
10589                         MP_WritePhyUshort(sc, 0x06, 0x0a2c);
10590                         MP_WritePhyUshort(sc, 0x06, 0xe50a);
10591                         MP_WritePhyUshort(sc, 0x06, 0x6de5);
10592                         MP_WritePhyUshort(sc, 0x06, 0x0a1d);
10593                         MP_WritePhyUshort(sc, 0x06, 0xe50a);
10594                         MP_WritePhyUshort(sc, 0x06, 0x1ce5);
10595                         MP_WritePhyUshort(sc, 0x06, 0x0a2d);
10596                         MP_WritePhyUshort(sc, 0x06, 0xa755);
10597                         MP_WritePhyUshort(sc, 0x05, 0x8b64);
10598                         MP_WritePhyUshort(sc, 0x06, 0x0000);
10599                         MP_WritePhyUshort(sc, 0x05, 0x8b94);
10600                         MP_WritePhyUshort(sc, 0x06, 0x84ec);
10601                         Data = MP_ReadPhyUshort(sc, 0x01);
10602                         Data |= 0x0001;
10603                         MP_WritePhyUshort(sc, 0x01, Data);
10604                         MP_WritePhyUshort(sc, 0x00, 0x0005);
10605                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
10606                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
10607                         for (i = 0; i < 200; i++) {
10608                                 DELAY(100);
10609                                 Data = MP_ReadPhyUshort(sc, 0x00);
10610                                 if (Data & 0x0080)
10611                                         break;
10612                         }
10613                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
10614                         MP_WritePhyUshort(sc, 0x1e, 0x0023);
10615                         MP_WritePhyUshort(sc, 0x17, 0x0116);
10616                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
10617                         MP_WritePhyUshort(sc, 0x1e, 0x0028);
10618                         MP_WritePhyUshort(sc, 0x15, 0x0010);
10619                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
10620                         //MP_WritePhyUshort(sc, 0x1e, 0x0020);
10621                         //MP_WritePhyUshort(sc, 0x15, 0x0100);
10622                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
10623                         MP_WritePhyUshort(sc, 0x1e, 0x0041);
10624                         MP_WritePhyUshort(sc, 0x15, 0x0802);
10625                         MP_WritePhyUshort(sc, 0x16, 0x2185);
10626                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
10627                 } else if (sc->re_type == MACFG_37) {
10628                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
10629                         MP_WritePhyUshort(sc, 0x00, 0x1800);
10630                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
10631                         MP_WritePhyUshort(sc, 0x1e, 0x0023);
10632                         MP_WritePhyUshort(sc, 0x17, 0x0117);
10633                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
10634                         MP_WritePhyUshort(sc, 0x1E, 0x002C);
10635                         MP_WritePhyUshort(sc, 0x1B, 0x5000);
10636                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
10637                         MP_WritePhyUshort(sc, 0x16, 0x4104);
10638                         for (i=0; i<200; i++) {
10639                                 DELAY(100);
10640                                 Data = MP_ReadPhyUshort(sc, 0x1E);
10641                                 Data &= 0x03FF;
10642                                 if (Data== 0x000C)
10643                                         break;
10644                         }
10645                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
10646                         for (i=0; i<200; i++) {
10647                                 DELAY(100);
10648                                 Data = MP_ReadPhyUshort(sc, 0x07);
10649                                 if ((Data&0x0020)==0)
10650                                         break;
10651                         }
10652                         Data = MP_ReadPhyUshort(sc, 0x07);
10653                         if (Data & 0x0020) {
10654                                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
10655                                 MP_WritePhyUshort(sc, 0x1e, 0x00a1);
10656                                 MP_WritePhyUshort(sc, 0x17, 0x1000);
10657                                 MP_WritePhyUshort(sc, 0x17, 0x0000);
10658                                 MP_WritePhyUshort(sc, 0x17, 0x2000);
10659                                 MP_WritePhyUshort(sc, 0x1e, 0x002f);
10660                                 MP_WritePhyUshort(sc, 0x18, 0x9bfb);
10661                                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
10662                                 MP_WritePhyUshort(sc, 0x07, 0x0000);
10663                                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
10664                         }
10665                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
10666                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
10667                         MP_WritePhyUshort(sc, 0x06, 0x0080);
10668                         Data = MP_ReadPhyUshort(sc, 0x00);
10669                         Data &= ~0x0080;
10670                         MP_WritePhyUshort(sc, 0x00, Data);
10671                         MP_WritePhyUshort(sc, 0x1f, 0x0002);
10672                         Data = MP_ReadPhyUshort(sc, 0x08);
10673                         Data &= ~0x0080;
10674                         MP_WritePhyUshort(sc, 0x08, Data);
10675                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
10676                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
10677                         MP_WritePhyUshort(sc, 0x1e, 0x0023);
10678                         MP_WritePhyUshort(sc, 0x16, 0x0306);
10679                         MP_WritePhyUshort(sc, 0x16, 0x0307);
10680                         MP_WritePhyUshort(sc, 0x15, 0x000e);
10681                         MP_WritePhyUshort(sc, 0x19, 0x000a);
10682                         MP_WritePhyUshort(sc, 0x15, 0x0010);
10683                         MP_WritePhyUshort(sc, 0x19, 0x0008);
10684                         MP_WritePhyUshort(sc, 0x15, 0x0018);
10685                         MP_WritePhyUshort(sc, 0x19, 0x4801);
10686                         MP_WritePhyUshort(sc, 0x15, 0x0019);
10687                         MP_WritePhyUshort(sc, 0x19, 0x6801);
10688                         MP_WritePhyUshort(sc, 0x15, 0x001a);
10689                         MP_WritePhyUshort(sc, 0x19, 0x66a1);
10690                         MP_WritePhyUshort(sc, 0x15, 0x001f);
10691                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10692                         MP_WritePhyUshort(sc, 0x15, 0x0020);
10693                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10694                         MP_WritePhyUshort(sc, 0x15, 0x0021);
10695                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10696                         MP_WritePhyUshort(sc, 0x15, 0x0022);
10697                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10698                         MP_WritePhyUshort(sc, 0x15, 0x0023);
10699                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10700                         MP_WritePhyUshort(sc, 0x15, 0x0024);
10701                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10702                         MP_WritePhyUshort(sc, 0x15, 0x0025);
10703                         MP_WritePhyUshort(sc, 0x19, 0x64a1);
10704                         MP_WritePhyUshort(sc, 0x15, 0x0026);
10705                         MP_WritePhyUshort(sc, 0x19, 0x40ea);
10706                         MP_WritePhyUshort(sc, 0x15, 0x0027);
10707                         MP_WritePhyUshort(sc, 0x19, 0x4503);
10708                         MP_WritePhyUshort(sc, 0x15, 0x0028);
10709                         MP_WritePhyUshort(sc, 0x19, 0x9f00);
10710                         MP_WritePhyUshort(sc, 0x15, 0x0029);
10711                         MP_WritePhyUshort(sc, 0x19, 0xa631);
10712                         MP_WritePhyUshort(sc, 0x15, 0x002a);
10713                         MP_WritePhyUshort(sc, 0x19, 0x9717);
10714                         MP_WritePhyUshort(sc, 0x15, 0x002b);
10715                         MP_WritePhyUshort(sc, 0x19, 0x302c);
10716                         MP_WritePhyUshort(sc, 0x15, 0x002c);
10717                         MP_WritePhyUshort(sc, 0x19, 0x4802);
10718                         MP_WritePhyUshort(sc, 0x15, 0x002d);
10719                         MP_WritePhyUshort(sc, 0x19, 0x58da);
10720                         MP_WritePhyUshort(sc, 0x15, 0x002e);
10721                         MP_WritePhyUshort(sc, 0x19, 0x400d);
10722                         MP_WritePhyUshort(sc, 0x15, 0x002f);
10723                         MP_WritePhyUshort(sc, 0x19, 0x4488);
10724                         MP_WritePhyUshort(sc, 0x15, 0x0030);
10725                         MP_WritePhyUshort(sc, 0x19, 0x9e00);
10726                         MP_WritePhyUshort(sc, 0x15, 0x0031);
10727                         MP_WritePhyUshort(sc, 0x19, 0x63c8);
10728                         MP_WritePhyUshort(sc, 0x15, 0x0032);
10729                         MP_WritePhyUshort(sc, 0x19, 0x6481);
10730                         MP_WritePhyUshort(sc, 0x15, 0x0033);
10731                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10732                         MP_WritePhyUshort(sc, 0x15, 0x0034);
10733                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10734                         MP_WritePhyUshort(sc, 0x15, 0x0035);
10735                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10736                         MP_WritePhyUshort(sc, 0x15, 0x0036);
10737                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10738                         MP_WritePhyUshort(sc, 0x15, 0x0037);
10739                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10740                         MP_WritePhyUshort(sc, 0x15, 0x0038);
10741                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10742                         MP_WritePhyUshort(sc, 0x15, 0x0039);
10743                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10744                         MP_WritePhyUshort(sc, 0x15, 0x003a);
10745                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10746                         MP_WritePhyUshort(sc, 0x15, 0x003b);
10747                         MP_WritePhyUshort(sc, 0x19, 0x63e8);
10748                         MP_WritePhyUshort(sc, 0x15, 0x003c);
10749                         MP_WritePhyUshort(sc, 0x19, 0x7d00);
10750                         MP_WritePhyUshort(sc, 0x15, 0x003d);
10751                         MP_WritePhyUshort(sc, 0x19, 0x59d4);
10752                         MP_WritePhyUshort(sc, 0x15, 0x003e);
10753                         MP_WritePhyUshort(sc, 0x19, 0x63f8);
10754                         MP_WritePhyUshort(sc, 0x15, 0x0040);
10755                         MP_WritePhyUshort(sc, 0x19, 0x64a1);
10756                         MP_WritePhyUshort(sc, 0x15, 0x0041);
10757                         MP_WritePhyUshort(sc, 0x19, 0x30de);
10758                         MP_WritePhyUshort(sc, 0x15, 0x0044);
10759                         MP_WritePhyUshort(sc, 0x19, 0x480f);
10760                         MP_WritePhyUshort(sc, 0x15, 0x0045);
10761                         MP_WritePhyUshort(sc, 0x19, 0x6800);
10762                         MP_WritePhyUshort(sc, 0x15, 0x0046);
10763                         MP_WritePhyUshort(sc, 0x19, 0x6680);
10764                         MP_WritePhyUshort(sc, 0x15, 0x0047);
10765                         MP_WritePhyUshort(sc, 0x19, 0x7c10);
10766                         MP_WritePhyUshort(sc, 0x15, 0x0048);
10767                         MP_WritePhyUshort(sc, 0x19, 0x63c8);
10768                         MP_WritePhyUshort(sc, 0x15, 0x0049);
10769                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10770                         MP_WritePhyUshort(sc, 0x15, 0x004a);
10771                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10772                         MP_WritePhyUshort(sc, 0x15, 0x004b);
10773                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10774                         MP_WritePhyUshort(sc, 0x15, 0x004c);
10775                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10776                         MP_WritePhyUshort(sc, 0x15, 0x004d);
10777                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10778                         MP_WritePhyUshort(sc, 0x15, 0x004e);
10779                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10780                         MP_WritePhyUshort(sc, 0x15, 0x004f);
10781                         MP_WritePhyUshort(sc, 0x19, 0x40ea);
10782                         MP_WritePhyUshort(sc, 0x15, 0x0050);
10783                         MP_WritePhyUshort(sc, 0x19, 0x4503);
10784                         MP_WritePhyUshort(sc, 0x15, 0x0051);
10785                         MP_WritePhyUshort(sc, 0x19, 0x58ca);
10786                         MP_WritePhyUshort(sc, 0x15, 0x0052);
10787                         MP_WritePhyUshort(sc, 0x19, 0x63c8);
10788                         MP_WritePhyUshort(sc, 0x15, 0x0053);
10789                         MP_WritePhyUshort(sc, 0x19, 0x63d8);
10790                         MP_WritePhyUshort(sc, 0x15, 0x0054);
10791                         MP_WritePhyUshort(sc, 0x19, 0x66a0);
10792                         MP_WritePhyUshort(sc, 0x15, 0x0055);
10793                         MP_WritePhyUshort(sc, 0x19, 0x9f00);
10794                         MP_WritePhyUshort(sc, 0x15, 0x0056);
10795                         MP_WritePhyUshort(sc, 0x19, 0x3000);
10796                         MP_WritePhyUshort(sc, 0x15, 0x00a1);
10797                         MP_WritePhyUshort(sc, 0x19, 0x3044);
10798                         MP_WritePhyUshort(sc, 0x15, 0x00ab);
10799                         MP_WritePhyUshort(sc, 0x19, 0x5820);
10800                         MP_WritePhyUshort(sc, 0x15, 0x00ac);
10801                         MP_WritePhyUshort(sc, 0x19, 0x5e04);
10802                         MP_WritePhyUshort(sc, 0x15, 0x00ad);
10803                         MP_WritePhyUshort(sc, 0x19, 0xb60c);
10804                         MP_WritePhyUshort(sc, 0x15, 0x00af);
10805                         MP_WritePhyUshort(sc, 0x19, 0x000a);
10806                         MP_WritePhyUshort(sc, 0x15, 0x00b2);
10807                         MP_WritePhyUshort(sc, 0x19, 0x30b9);
10808                         MP_WritePhyUshort(sc, 0x15, 0x00b9);
10809                         MP_WritePhyUshort(sc, 0x19, 0x4408);
10810                         MP_WritePhyUshort(sc, 0x15, 0x00ba);
10811                         MP_WritePhyUshort(sc, 0x19, 0x480b);
10812                         MP_WritePhyUshort(sc, 0x15, 0x00bb);
10813                         MP_WritePhyUshort(sc, 0x19, 0x5e00);
10814                         MP_WritePhyUshort(sc, 0x15, 0x00bc);
10815                         MP_WritePhyUshort(sc, 0x19, 0x405f);
10816                         MP_WritePhyUshort(sc, 0x15, 0x00bd);
10817                         MP_WritePhyUshort(sc, 0x19, 0x4448);
10818                         MP_WritePhyUshort(sc, 0x15, 0x00be);
10819                         MP_WritePhyUshort(sc, 0x19, 0x4020);
10820                         MP_WritePhyUshort(sc, 0x15, 0x00bf);
10821                         MP_WritePhyUshort(sc, 0x19, 0x4468);
10822                         MP_WritePhyUshort(sc, 0x15, 0x00c0);
10823                         MP_WritePhyUshort(sc, 0x19, 0x9c02);
10824                         MP_WritePhyUshort(sc, 0x15, 0x00c1);
10825                         MP_WritePhyUshort(sc, 0x19, 0x58a0);
10826                         MP_WritePhyUshort(sc, 0x15, 0x00c2);
10827                         MP_WritePhyUshort(sc, 0x19, 0xb605);
10828                         MP_WritePhyUshort(sc, 0x15, 0x00c3);
10829                         MP_WritePhyUshort(sc, 0x19, 0xc0d3);
10830                         MP_WritePhyUshort(sc, 0x15, 0x00c4);
10831                         MP_WritePhyUshort(sc, 0x19, 0x00e6);
10832                         MP_WritePhyUshort(sc, 0x15, 0x00c5);
10833                         MP_WritePhyUshort(sc, 0x19, 0xdaec);
10834                         MP_WritePhyUshort(sc, 0x15, 0x00c6);
10835                         MP_WritePhyUshort(sc, 0x19, 0x00fa);
10836                         MP_WritePhyUshort(sc, 0x15, 0x00c7);
10837                         MP_WritePhyUshort(sc, 0x19, 0x9df9);
10838                         MP_WritePhyUshort(sc, 0x15, 0x0112);
10839                         MP_WritePhyUshort(sc, 0x19, 0x6421);
10840                         MP_WritePhyUshort(sc, 0x15, 0x0113);
10841                         MP_WritePhyUshort(sc, 0x19, 0x7c08);
10842                         MP_WritePhyUshort(sc, 0x15, 0x0114);
10843                         MP_WritePhyUshort(sc, 0x19, 0x63f0);
10844                         MP_WritePhyUshort(sc, 0x15, 0x0115);
10845                         MP_WritePhyUshort(sc, 0x19, 0x4003);
10846                         MP_WritePhyUshort(sc, 0x15, 0x0116);
10847                         MP_WritePhyUshort(sc, 0x19, 0x4418);
10848                         MP_WritePhyUshort(sc, 0x15, 0x0117);
10849                         MP_WritePhyUshort(sc, 0x19, 0x9b00);
10850                         MP_WritePhyUshort(sc, 0x15, 0x0118);
10851                         MP_WritePhyUshort(sc, 0x19, 0x6461);
10852                         MP_WritePhyUshort(sc, 0x15, 0x0119);
10853                         MP_WritePhyUshort(sc, 0x19, 0x64e1);
10854                         MP_WritePhyUshort(sc, 0x15, 0x011a);
10855                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10856                         MP_WritePhyUshort(sc, 0x15, 0x0150);
10857                         MP_WritePhyUshort(sc, 0x19, 0x7c80);
10858                         MP_WritePhyUshort(sc, 0x15, 0x0151);
10859                         MP_WritePhyUshort(sc, 0x19, 0x6461);
10860                         MP_WritePhyUshort(sc, 0x15, 0x0152);
10861                         MP_WritePhyUshort(sc, 0x19, 0x4003);
10862                         MP_WritePhyUshort(sc, 0x15, 0x0153);
10863                         MP_WritePhyUshort(sc, 0x19, 0x4540);
10864                         MP_WritePhyUshort(sc, 0x15, 0x0154);
10865                         MP_WritePhyUshort(sc, 0x19, 0x9f00);
10866                         MP_WritePhyUshort(sc, 0x15, 0x0155);
10867                         MP_WritePhyUshort(sc, 0x19, 0x9d00);
10868                         MP_WritePhyUshort(sc, 0x15, 0x0156);
10869                         MP_WritePhyUshort(sc, 0x19, 0x7c40);
10870                         MP_WritePhyUshort(sc, 0x15, 0x0157);
10871                         MP_WritePhyUshort(sc, 0x19, 0x6421);
10872                         MP_WritePhyUshort(sc, 0x15, 0x0158);
10873                         MP_WritePhyUshort(sc, 0x19, 0x7c80);
10874                         MP_WritePhyUshort(sc, 0x15, 0x0159);
10875                         MP_WritePhyUshort(sc, 0x19, 0x64a1);
10876                         MP_WritePhyUshort(sc, 0x15, 0x015a);
10877                         MP_WritePhyUshort(sc, 0x19, 0x30fe);
10878                         MP_WritePhyUshort(sc, 0x15, 0x02e7);
10879                         MP_WritePhyUshort(sc, 0x19, 0x0000);
10880                         MP_WritePhyUshort(sc, 0x15, 0x0329);
10881                         MP_WritePhyUshort(sc, 0x19, 0x7c00);
10882                         MP_WritePhyUshort(sc, 0x15, 0x0382);
10883                         MP_WritePhyUshort(sc, 0x19, 0x7c40);
10884                         MP_WritePhyUshort(sc, 0x15, 0x03bd);
10885                         MP_WritePhyUshort(sc, 0x19, 0x405e);
10886                         MP_WritePhyUshort(sc, 0x15, 0x03c9);
10887                         MP_WritePhyUshort(sc, 0x19, 0x7c00);
10888                         MP_WritePhyUshort(sc, 0x15, 0x03e3);
10889                         MP_WritePhyUshort(sc, 0x19, 0x7c00);
10890                         MP_WritePhyUshort(sc, 0x16, 0x0306);
10891                         MP_WritePhyUshort(sc, 0x16, 0x0300);
10892                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
10893                         MP_WritePhyUshort(sc, 0x05, 0xfff6);
10894                         MP_WritePhyUshort(sc, 0x06, 0x0080);
10895                         MP_WritePhyUshort(sc, 0x05, 0x8000);
10896                         MP_WritePhyUshort(sc, 0x06, 0x0280);
10897                         MP_WritePhyUshort(sc, 0x06, 0x48f7);
10898                         MP_WritePhyUshort(sc, 0x06, 0x00e0);
10899                         MP_WritePhyUshort(sc, 0x06, 0xfff7);
10900                         MP_WritePhyUshort(sc, 0x06, 0xa080);
10901                         MP_WritePhyUshort(sc, 0x06, 0x02ae);
10902                         MP_WritePhyUshort(sc, 0x06, 0xf602);
10903                         MP_WritePhyUshort(sc, 0x06, 0x0200);
10904                         MP_WritePhyUshort(sc, 0x06, 0x0202);
10905                         MP_WritePhyUshort(sc, 0x06, 0x1102);
10906                         MP_WritePhyUshort(sc, 0x06, 0x0224);
10907                         MP_WritePhyUshort(sc, 0x06, 0x0202);
10908                         MP_WritePhyUshort(sc, 0x06, 0x3402);
10909                         MP_WritePhyUshort(sc, 0x06, 0x027f);
10910                         MP_WritePhyUshort(sc, 0x06, 0x0202);
10911                         MP_WritePhyUshort(sc, 0x06, 0x9202);
10912                         MP_WritePhyUshort(sc, 0x06, 0x8078);
10913                         MP_WritePhyUshort(sc, 0x06, 0xe08b);
10914                         MP_WritePhyUshort(sc, 0x06, 0x88e1);
10915                         MP_WritePhyUshort(sc, 0x06, 0x8b89);
10916                         MP_WritePhyUshort(sc, 0x06, 0x1e01);
10917                         MP_WritePhyUshort(sc, 0x06, 0xe18b);
10918                         MP_WritePhyUshort(sc, 0x06, 0x8a1e);
10919                         MP_WritePhyUshort(sc, 0x06, 0x01e1);
10920                         MP_WritePhyUshort(sc, 0x06, 0x8b8b);
10921                         MP_WritePhyUshort(sc, 0x06, 0x1e01);
10922                         MP_WritePhyUshort(sc, 0x06, 0xe18b);
10923                         MP_WritePhyUshort(sc, 0x06, 0x8c1e);
10924                         MP_WritePhyUshort(sc, 0x06, 0x01e1);
10925                         MP_WritePhyUshort(sc, 0x06, 0x8b8d);
10926                         MP_WritePhyUshort(sc, 0x06, 0x1e01);
10927                         MP_WritePhyUshort(sc, 0x06, 0xe18b);
10928                         MP_WritePhyUshort(sc, 0x06, 0x8e1e);
10929                         MP_WritePhyUshort(sc, 0x06, 0x01a0);
10930                         MP_WritePhyUshort(sc, 0x06, 0x00c7);
10931                         MP_WritePhyUshort(sc, 0x06, 0xaebb);
10932                         MP_WritePhyUshort(sc, 0x06, 0xee85);
10933                         MP_WritePhyUshort(sc, 0x06, 0x0000);
10934                         MP_WritePhyUshort(sc, 0x06, 0xd480);
10935                         MP_WritePhyUshort(sc, 0x06, 0xebe4);
10936                         MP_WritePhyUshort(sc, 0x06, 0x8b94);
10937                         MP_WritePhyUshort(sc, 0x06, 0xe58b);
10938                         MP_WritePhyUshort(sc, 0x06, 0x95bf);
10939                         MP_WritePhyUshort(sc, 0x06, 0x8b88);
10940                         MP_WritePhyUshort(sc, 0x06, 0xec00);
10941                         MP_WritePhyUshort(sc, 0x06, 0x19a9);
10942                         MP_WritePhyUshort(sc, 0x06, 0x8b90);
10943                         MP_WritePhyUshort(sc, 0x06, 0xf9ee);
10944                         MP_WritePhyUshort(sc, 0x06, 0xfff6);
10945                         MP_WritePhyUshort(sc, 0x06, 0x00ee);
10946                         MP_WritePhyUshort(sc, 0x06, 0xfff7);
10947                         MP_WritePhyUshort(sc, 0x06, 0xffe0);
10948                         MP_WritePhyUshort(sc, 0x06, 0xe140);
10949                         MP_WritePhyUshort(sc, 0x06, 0xe1e1);
10950                         MP_WritePhyUshort(sc, 0x06, 0x41f7);
10951                         MP_WritePhyUshort(sc, 0x06, 0x2ff6);
10952                         MP_WritePhyUshort(sc, 0x06, 0x28e4);
10953                         MP_WritePhyUshort(sc, 0x06, 0xe140);
10954                         MP_WritePhyUshort(sc, 0x06, 0xe5e1);
10955                         MP_WritePhyUshort(sc, 0x06, 0x4104);
10956                         MP_WritePhyUshort(sc, 0x06, 0xf8e0);
10957                         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
10958                         MP_WritePhyUshort(sc, 0x06, 0xad20);
10959                         MP_WritePhyUshort(sc, 0x06, 0x11f6);
10960                         MP_WritePhyUshort(sc, 0x06, 0x20e4);
10961                         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
10962                         MP_WritePhyUshort(sc, 0x06, 0x0280);
10963                         MP_WritePhyUshort(sc, 0x06, 0xba02);
10964                         MP_WritePhyUshort(sc, 0x06, 0x1bf4);
10965                         MP_WritePhyUshort(sc, 0x06, 0x022c);
10966                         MP_WritePhyUshort(sc, 0x06, 0x9c02);
10967                         MP_WritePhyUshort(sc, 0x06, 0x812c);
10968                         MP_WritePhyUshort(sc, 0x06, 0xad22);
10969                         MP_WritePhyUshort(sc, 0x06, 0x11f6);
10970                         MP_WritePhyUshort(sc, 0x06, 0x22e4);
10971                         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
10972                         MP_WritePhyUshort(sc, 0x06, 0x022c);
10973                         MP_WritePhyUshort(sc, 0x06, 0x4602);
10974                         MP_WritePhyUshort(sc, 0x06, 0x2ac5);
10975                         MP_WritePhyUshort(sc, 0x06, 0x0229);
10976                         MP_WritePhyUshort(sc, 0x06, 0x2002);
10977                         MP_WritePhyUshort(sc, 0x06, 0x2b91);
10978                         MP_WritePhyUshort(sc, 0x06, 0xad25);
10979                         MP_WritePhyUshort(sc, 0x06, 0x11f6);
10980                         MP_WritePhyUshort(sc, 0x06, 0x25e4);
10981                         MP_WritePhyUshort(sc, 0x06, 0x8b8e);
10982                         MP_WritePhyUshort(sc, 0x06, 0x0203);
10983                         MP_WritePhyUshort(sc, 0x06, 0x5a02);
10984                         MP_WritePhyUshort(sc, 0x06, 0x043a);
10985                         MP_WritePhyUshort(sc, 0x06, 0x021a);
10986                         MP_WritePhyUshort(sc, 0x06, 0x5902);
10987                         MP_WritePhyUshort(sc, 0x06, 0x2bfc);
10988                         MP_WritePhyUshort(sc, 0x06, 0xfc04);
10989                         MP_WritePhyUshort(sc, 0x06, 0xf8fa);
10990                         MP_WritePhyUshort(sc, 0x06, 0xef69);
10991                         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
10992                         MP_WritePhyUshort(sc, 0x06, 0x00e1);
10993                         MP_WritePhyUshort(sc, 0x06, 0xe001);
10994                         MP_WritePhyUshort(sc, 0x06, 0xad27);
10995                         MP_WritePhyUshort(sc, 0x06, 0x1fd1);
10996                         MP_WritePhyUshort(sc, 0x06, 0x01bf);
10997                         MP_WritePhyUshort(sc, 0x06, 0x819f);
10998                         MP_WritePhyUshort(sc, 0x06, 0x022f);
10999                         MP_WritePhyUshort(sc, 0x06, 0x50e0);
11000                         MP_WritePhyUshort(sc, 0x06, 0xe020);
11001                         MP_WritePhyUshort(sc, 0x06, 0xe1e0);
11002                         MP_WritePhyUshort(sc, 0x06, 0x21ad);
11003                         MP_WritePhyUshort(sc, 0x06, 0x200e);
11004                         MP_WritePhyUshort(sc, 0x06, 0xd100);
11005                         MP_WritePhyUshort(sc, 0x06, 0xbf81);
11006                         MP_WritePhyUshort(sc, 0x06, 0x9f02);
11007                         MP_WritePhyUshort(sc, 0x06, 0x2f50);
11008                         MP_WritePhyUshort(sc, 0x06, 0xbf3d);
11009                         MP_WritePhyUshort(sc, 0x06, 0x3902);
11010                         MP_WritePhyUshort(sc, 0x06, 0x2eb0);
11011                         MP_WritePhyUshort(sc, 0x06, 0xef96);
11012                         MP_WritePhyUshort(sc, 0x06, 0xfefc);
11013                         MP_WritePhyUshort(sc, 0x06, 0x0402);
11014                         MP_WritePhyUshort(sc, 0x06, 0x80ef);
11015                         MP_WritePhyUshort(sc, 0x06, 0x05f8);
11016                         MP_WritePhyUshort(sc, 0x06, 0xfaef);
11017                         MP_WritePhyUshort(sc, 0x06, 0x69e0);
11018                         MP_WritePhyUshort(sc, 0x06, 0xe2fe);
11019                         MP_WritePhyUshort(sc, 0x06, 0xe1e2);
11020                         MP_WritePhyUshort(sc, 0x06, 0xffad);
11021                         MP_WritePhyUshort(sc, 0x06, 0x2d1a);
11022                         MP_WritePhyUshort(sc, 0x06, 0xe0e1);
11023                         MP_WritePhyUshort(sc, 0x06, 0x4ee1);
11024                         MP_WritePhyUshort(sc, 0x06, 0xe14f);
11025                         MP_WritePhyUshort(sc, 0x06, 0xac2d);
11026                         MP_WritePhyUshort(sc, 0x06, 0x22f6);
11027                         MP_WritePhyUshort(sc, 0x06, 0x0302);
11028                         MP_WritePhyUshort(sc, 0x06, 0x0336);
11029                         MP_WritePhyUshort(sc, 0x06, 0xf703);
11030                         MP_WritePhyUshort(sc, 0x06, 0xf706);
11031                         MP_WritePhyUshort(sc, 0x06, 0xbf81);
11032                         MP_WritePhyUshort(sc, 0x06, 0x8902);
11033                         MP_WritePhyUshort(sc, 0x06, 0x2eb0);
11034                         MP_WritePhyUshort(sc, 0x06, 0xae11);
11035                         MP_WritePhyUshort(sc, 0x06, 0xe0e1);
11036                         MP_WritePhyUshort(sc, 0x06, 0x4ee1);
11037                         MP_WritePhyUshort(sc, 0x06, 0xe14f);
11038                         MP_WritePhyUshort(sc, 0x06, 0xad2d);
11039                         MP_WritePhyUshort(sc, 0x06, 0x08bf);
11040                         MP_WritePhyUshort(sc, 0x06, 0x8194);
11041                         MP_WritePhyUshort(sc, 0x06, 0x022e);
11042                         MP_WritePhyUshort(sc, 0x06, 0xb0f6);
11043                         MP_WritePhyUshort(sc, 0x06, 0x06ef);
11044                         MP_WritePhyUshort(sc, 0x06, 0x96fe);
11045                         MP_WritePhyUshort(sc, 0x06, 0xfc04);
11046                         MP_WritePhyUshort(sc, 0x06, 0xf8f9);
11047                         MP_WritePhyUshort(sc, 0x06, 0xfaef);
11048                         MP_WritePhyUshort(sc, 0x06, 0x69e0);
11049                         MP_WritePhyUshort(sc, 0x06, 0x8b87);
11050                         MP_WritePhyUshort(sc, 0x06, 0xad20);
11051                         MP_WritePhyUshort(sc, 0x06, 0x4cd2);
11052                         MP_WritePhyUshort(sc, 0x06, 0x00e0);
11053                         MP_WritePhyUshort(sc, 0x06, 0xe200);
11054                         MP_WritePhyUshort(sc, 0x06, 0x5801);
11055                         MP_WritePhyUshort(sc, 0x06, 0x0c02);
11056                         MP_WritePhyUshort(sc, 0x06, 0x1e20);
11057                         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
11058                         MP_WritePhyUshort(sc, 0x06, 0x0058);
11059                         MP_WritePhyUshort(sc, 0x06, 0x101e);
11060                         MP_WritePhyUshort(sc, 0x06, 0x20e0);
11061                         MP_WritePhyUshort(sc, 0x06, 0xe036);
11062                         MP_WritePhyUshort(sc, 0x06, 0x5803);
11063                         MP_WritePhyUshort(sc, 0x06, 0x1e20);
11064                         MP_WritePhyUshort(sc, 0x06, 0xe0e0);
11065                         MP_WritePhyUshort(sc, 0x06, 0x22e1);
11066                         MP_WritePhyUshort(sc, 0x06, 0xe023);
11067                         MP_WritePhyUshort(sc, 0x06, 0x58e0);
11068                         MP_WritePhyUshort(sc, 0x06, 0x1e20);
11069                         MP_WritePhyUshort(sc, 0x06, 0xe085);
11070                         MP_WritePhyUshort(sc, 0x06, 0x001f);
11071                         MP_WritePhyUshort(sc, 0x06, 0x029e);
11072                         MP_WritePhyUshort(sc, 0x06, 0x22e6);
11073                         MP_WritePhyUshort(sc, 0x06, 0x8500);
11074                         MP_WritePhyUshort(sc, 0x06, 0xad32);
11075                         MP_WritePhyUshort(sc, 0x06, 0x14ad);
11076                         MP_WritePhyUshort(sc, 0x06, 0x3411);
11077                         MP_WritePhyUshort(sc, 0x06, 0xef02);
11078                         MP_WritePhyUshort(sc, 0x06, 0x5803);
11079                         MP_WritePhyUshort(sc, 0x06, 0x9e07);
11080                         MP_WritePhyUshort(sc, 0x06, 0xad35);
11081                         MP_WritePhyUshort(sc, 0x06, 0x085a);
11082                         MP_WritePhyUshort(sc, 0x06, 0xc09f);
11083                         MP_WritePhyUshort(sc, 0x06, 0x04d1);
11084                         MP_WritePhyUshort(sc, 0x06, 0x01ae);
11085                         MP_WritePhyUshort(sc, 0x06, 0x02d1);
11086                         MP_WritePhyUshort(sc, 0x06, 0x00bf);
11087                         MP_WritePhyUshort(sc, 0x06, 0x81a5);
11088                         MP_WritePhyUshort(sc, 0x06, 0x022f);
11089                         MP_WritePhyUshort(sc, 0x06, 0x50ef);
11090                         MP_WritePhyUshort(sc, 0x06, 0x96fe);
11091                         MP_WritePhyUshort(sc, 0x06, 0xfdfc);
11092                         MP_WritePhyUshort(sc, 0x06, 0x04a7);
11093                         MP_WritePhyUshort(sc, 0x06, 0x25e5);
11094                         MP_WritePhyUshort(sc, 0x06, 0x0a1d);
11095                         MP_WritePhyUshort(sc, 0x06, 0xe50a);
11096                         MP_WritePhyUshort(sc, 0x06, 0x2ce5);
11097                         MP_WritePhyUshort(sc, 0x06, 0x0a6d);
11098                         MP_WritePhyUshort(sc, 0x06, 0xe50a);
11099                         MP_WritePhyUshort(sc, 0x06, 0x1de5);
11100                         MP_WritePhyUshort(sc, 0x06, 0x0a1c);
11101                         MP_WritePhyUshort(sc, 0x06, 0xe50a);
11102                         MP_WritePhyUshort(sc, 0x06, 0x2da7);
11103                         MP_WritePhyUshort(sc, 0x06, 0x5500);
11104                         MP_WritePhyUshort(sc, 0x06, 0xe234);
11105                         MP_WritePhyUshort(sc, 0x06, 0x88e2);
11106                         MP_WritePhyUshort(sc, 0x06, 0x00cc);
11107                         MP_WritePhyUshort(sc, 0x06, 0xe200);
11108                         MP_WritePhyUshort(sc, 0x05, 0x8b86);
11109                         MP_WritePhyUshort(sc, 0x06, 0x0001);
11110                         Data = MP_ReadPhyUshort(sc, 0x01);
11111                         Data |= 0x0001;
11112                         MP_WritePhyUshort(sc, 0x01, Data);
11113                         MP_WritePhyUshort(sc, 0x00, 0x0005);
11114                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
11115                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
11116                         MP_WritePhyUshort(sc, 0x17, 0x2179);
11117                         MP_WritePhyUshort(sc, 0x1f, 0x0001);
11118                         MP_WritePhyUshort(sc, 0x10, 0xf274);
11119                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
11120                         MP_WritePhyUshort(sc, 0x1e, 0x0042);
11121                         MP_WritePhyUshort(sc, 0x15, 0x0f00);
11122                         MP_WritePhyUshort(sc, 0x15, 0x0f00);
11123                         MP_WritePhyUshort(sc, 0x16, 0x7408);
11124                         MP_WritePhyUshort(sc, 0x15, 0x0e00);
11125                         MP_WritePhyUshort(sc, 0x15, 0x0f00);
11126                         MP_WritePhyUshort(sc, 0x15, 0x0f01);
11127                         MP_WritePhyUshort(sc, 0x16, 0x4000);
11128                         MP_WritePhyUshort(sc, 0x15, 0x0e01);
11129                         MP_WritePhyUshort(sc, 0x15, 0x0f01);
11130                         MP_WritePhyUshort(sc, 0x15, 0x0f02);
11131                         MP_WritePhyUshort(sc, 0x16, 0x9400);
11132                         MP_WritePhyUshort(sc, 0x15, 0x0e02);
11133                         MP_WritePhyUshort(sc, 0x15, 0x0f02);
11134                         MP_WritePhyUshort(sc, 0x15, 0x0f03);
11135                         MP_WritePhyUshort(sc, 0x16, 0x7408);
11136                         MP_WritePhyUshort(sc, 0x15, 0x0e03);
11137                         MP_WritePhyUshort(sc, 0x15, 0x0f03);
11138                         MP_WritePhyUshort(sc, 0x15, 0x0f04);
11139                         MP_WritePhyUshort(sc, 0x16, 0x4008);
11140                         MP_WritePhyUshort(sc, 0x15, 0x0e04);
11141                         MP_WritePhyUshort(sc, 0x15, 0x0f04);
11142                         MP_WritePhyUshort(sc, 0x15, 0x0f05);
11143                         MP_WritePhyUshort(sc, 0x16, 0x9400);
11144                         MP_WritePhyUshort(sc, 0x15, 0x0e05);
11145                         MP_WritePhyUshort(sc, 0x15, 0x0f05);
11146                         MP_WritePhyUshort(sc, 0x15, 0x0f06);
11147                         MP_WritePhyUshort(sc, 0x16, 0x0803);
11148                         MP_WritePhyUshort(sc, 0x15, 0x0e06);
11149                         MP_WritePhyUshort(sc, 0x15, 0x0f06);
11150                         MP_WritePhyUshort(sc, 0x15, 0x0d00);
11151                         MP_WritePhyUshort(sc, 0x15, 0x0100);
11152                         MP_WritePhyUshort(sc, 0x1f, 0x0001);
11153                         MP_WritePhyUshort(sc, 0x10, 0xf074);
11154                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
11155                         MP_WritePhyUshort(sc, 0x17, 0x2149);
11156                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
11157                         for (i=0; i<200; i++) {
11158                                 DELAY(100);
11159                                 Data = MP_ReadPhyUshort(sc, 0x00);
11160                                 if (Data&0x0080)
11161                                         break;
11162                         }
11163                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
11164                         MP_WritePhyUshort(sc, 0x1e, 0x0023);
11165                         MP_WritePhyUshort(sc, 0x17, 0x0116);
11166                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
11167                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
11168                         MP_WritePhyUshort(sc, 0x1e, 0x0023);
11169                         Data = MP_ReadPhyUshort(sc, 0x17);
11170                         Data |= 0x4000;
11171                         MP_WritePhyUshort(sc, 0x17, Data);
11172                         MP_WritePhyUshort(sc, 0x1e, 0x0020);
11173                         Data = MP_ReadPhyUshort(sc, 0x1b);
11174                         Data |= 0x0080;
11175                         MP_WritePhyUshort(sc, 0x1b, Data);
11176                         MP_WritePhyUshort(sc, 0x1e, 0x0041);
11177                         MP_WritePhyUshort(sc, 0x15, 0x0e02);
11178                         MP_WritePhyUshort(sc, 0x1e, 0x0028);
11179                         Data = MP_ReadPhyUshort(sc, 0x19);
11180                         Data |= 0x8000;
11181                         MP_WritePhyUshort(sc, 0x19, Data);
11182                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
11183                 }
11184
11185                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
11186                 MP_WritePhyUshort(sc, 0x1E, 0x0023);
11187                 Data = MP_ReadPhyUshort(sc, 0x17) | 0x0006;
11188                 MP_WritePhyUshort(sc, 0x17, Data);
11189                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
11190
11191                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
11192                 MP_WritePhyUshort(sc, 0x05, 0x8b80);
11193                 MP_WritePhyUshort(sc, 0x06, 0xc896);
11194                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
11195
11196                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
11197                 MP_WritePhyUshort(sc, 0x0B, 0x6C20);
11198                 MP_WritePhyUshort(sc, 0x07, 0x2872);
11199                 MP_WritePhyUshort(sc, 0x1C, 0xEFFF);
11200                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
11201                 MP_WritePhyUshort(sc, 0x14, 0x6420);
11202                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
11203
11204                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
11205                 Data = MP_ReadPhyUshort(sc, 0x08) & 0x00FF;
11206                 MP_WritePhyUshort(sc, 0x08, Data | 0x8000);
11207
11208                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
11209                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
11210                 Data = MP_ReadPhyUshort(sc, 0x18);
11211                 MP_WritePhyUshort(sc, 0x18, Data | 0x0050);
11212                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
11213                 Data = MP_ReadPhyUshort(sc, 0x14);
11214                 MP_WritePhyUshort(sc, 0x14, Data | 0x8000);
11215
11216                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
11217                 MP_WritePhyUshort(sc, 0x00, 0x080B);
11218                 MP_WritePhyUshort(sc, 0x0B, 0x09D7);
11219                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
11220                 MP_WritePhyUshort(sc, 0x15, 0x1006);
11221
11222                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
11223                 MP_WritePhyUshort(sc, 0x1E, 0x002F);
11224                 MP_WritePhyUshort(sc, 0x15, 0x1919);
11225                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
11226
11227                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
11228                 MP_WritePhyUshort(sc, 0x19, 0x7F46);
11229                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
11230                 MP_WritePhyUshort(sc, 0x05, 0x8AD2);
11231                 MP_WritePhyUshort(sc, 0x06, 0x6810);
11232                 MP_WritePhyUshort(sc, 0x05, 0x8AD4);
11233                 MP_WritePhyUshort(sc, 0x06, 0x8002);
11234                 MP_WritePhyUshort(sc, 0x05, 0x8ADE);
11235                 MP_WritePhyUshort(sc, 0x06, 0x8025);
11236                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
11237         } else if (sc->re_type == MACFG_38) {
11238                 CSR_WRITE_1(sc, 0x6E, CSR_READ_1(sc, 0x6E)| (1<<6));
11239
11240                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
11241                 Data_u32 &= ~BIT_1;
11242                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
11243
11244                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
11245                 MP_WritePhyUshort(sc, 0x00, 0x1800);
11246                 Data= MP_ReadPhyUshort(sc, 0x15);
11247                 Data &= ~BIT_12;
11248                 MP_WritePhyUshort(sc, 0x15, Data);
11249                 DELAY(200);
11250                 DELAY(200);
11251                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
11252                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
11253                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
11254                 Data = MP_ReadPhyUshort(sc, 0x17);
11255                 if ((Data & BIT_11) == 0x0000) {
11256                         Data |= BIT_0;
11257                         MP_WritePhyUshort(sc, 0x17, Data);
11258                         for (i = 0; i < 200; i++) {
11259                                 DELAY(100);
11260                                 Data = MP_ReadPhyUshort(sc, 0x17);
11261                                 if (Data & BIT_11)
11262                                         break;
11263                         }
11264                 }
11265                 Data = MP_ReadPhyUshort(sc, 0x17);
11266                 Data |= BIT_11;
11267                 MP_WritePhyUshort(sc, 0x17,Data);
11268                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
11269                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
11270                 MP_WritePhyUshort(sc, 0x1E, 0x002C);
11271                 MP_WritePhyUshort(sc, 0x1B, 0x5000);
11272                 MP_WritePhyUshort(sc, 0x1E, 0x002d);
11273                 MP_WritePhyUshort(sc, 0x19, 0x0004);
11274                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
11275                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
11276                 for (i = 0; i < 200; i++) {
11277                         DELAY(100);
11278                         Data= MP_ReadPhyUshort(sc, 0x1E);
11279                         if ((Data& 0x03FF) == 0x0014)
11280                                 break;
11281                 }
11282                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
11283                 for (i = 0; i < 200; i++) {
11284                         DELAY(100);
11285                         Data= MP_ReadPhyUshort(sc, 0x07);
11286                         if ((Data& BIT_5) == 0)
11287                                 break;
11288                 }
11289                 Data = MP_ReadPhyUshort(sc, 0x07);
11290                 if (Data & BIT_5) {
11291                         MP_WritePhyUshort(sc, 0x1f, 0x0004);
11292                         MP_WritePhyUshort(sc, 0x1f, 0x0007);
11293                         MP_WritePhyUshort(sc, 0x1e, 0x00a1);
11294                         MP_WritePhyUshort(sc, 0x17, 0x1000);
11295                         MP_WritePhyUshort(sc, 0x17, 0x0000);
11296                         MP_WritePhyUshort(sc, 0x17, 0x2000);
11297                         MP_WritePhyUshort(sc, 0x1e, 0x002f);
11298                         MP_WritePhyUshort(sc, 0x18, 0x9bfb);
11299                         MP_WritePhyUshort(sc, 0x1f, 0x0005);
11300                         MP_WritePhyUshort(sc, 0x07, 0x0000);
11301                         MP_WritePhyUshort(sc, 0x1f, 0x0002);
11302                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
11303                 }
11304                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
11305                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
11306                 MP_WritePhyUshort(sc, 0x06, 0x0080);
11307                 Data = MP_ReadPhyUshort(sc, 0x00);
11308                 Data &= ~BIT_7;
11309                 MP_WritePhyUshort(sc, 0x00, Data);
11310                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
11311                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
11312                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
11313                 MP_WritePhyUshort(sc, 0x16, 0x0306);
11314                 MP_WritePhyUshort(sc, 0x16, 0x0307);
11315                 MP_WritePhyUshort(sc, 0x15, 0x0000);
11316                 MP_WritePhyUshort(sc, 0x19, 0x407d);
11317                 MP_WritePhyUshort(sc, 0x15, 0x0001);
11318                 MP_WritePhyUshort(sc, 0x19, 0x440f);
11319                 MP_WritePhyUshort(sc, 0x15, 0x0002);
11320                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
11321                 MP_WritePhyUshort(sc, 0x15, 0x0003);
11322                 MP_WritePhyUshort(sc, 0x19, 0x6c03);
11323                 MP_WritePhyUshort(sc, 0x15, 0x0004);
11324                 MP_WritePhyUshort(sc, 0x19, 0xc4d5);
11325                 MP_WritePhyUshort(sc, 0x15, 0x0005);
11326                 MP_WritePhyUshort(sc, 0x19, 0x00ff);
11327                 MP_WritePhyUshort(sc, 0x15, 0x0006);
11328                 MP_WritePhyUshort(sc, 0x19, 0x74f0);
11329                 MP_WritePhyUshort(sc, 0x15, 0x0007);
11330                 MP_WritePhyUshort(sc, 0x19, 0x4880);
11331                 MP_WritePhyUshort(sc, 0x15, 0x0008);
11332                 MP_WritePhyUshort(sc, 0x19, 0x4c00);
11333                 MP_WritePhyUshort(sc, 0x15, 0x0009);
11334                 MP_WritePhyUshort(sc, 0x19, 0x4800);
11335                 MP_WritePhyUshort(sc, 0x15, 0x000a);
11336                 MP_WritePhyUshort(sc, 0x19, 0x5000);
11337                 MP_WritePhyUshort(sc, 0x15, 0x000b);
11338                 MP_WritePhyUshort(sc, 0x19, 0x4400);
11339                 MP_WritePhyUshort(sc, 0x15, 0x000c);
11340                 MP_WritePhyUshort(sc, 0x19, 0x7801);
11341                 MP_WritePhyUshort(sc, 0x15, 0x000d);
11342                 MP_WritePhyUshort(sc, 0x19, 0x4000);
11343                 MP_WritePhyUshort(sc, 0x15, 0x000e);
11344                 MP_WritePhyUshort(sc, 0x19, 0x7800);
11345                 MP_WritePhyUshort(sc, 0x15, 0x000f);
11346                 MP_WritePhyUshort(sc, 0x19, 0x7010);
11347                 MP_WritePhyUshort(sc, 0x15, 0x0010);
11348                 MP_WritePhyUshort(sc, 0x19, 0x6804);
11349                 MP_WritePhyUshort(sc, 0x15, 0x0011);
11350                 MP_WritePhyUshort(sc, 0x19, 0x64a0);
11351                 MP_WritePhyUshort(sc, 0x15, 0x0012);
11352                 MP_WritePhyUshort(sc, 0x19, 0x63da);
11353                 MP_WritePhyUshort(sc, 0x15, 0x0013);
11354                 MP_WritePhyUshort(sc, 0x19, 0x63d8);
11355                 MP_WritePhyUshort(sc, 0x15, 0x0014);
11356                 MP_WritePhyUshort(sc, 0x19, 0x6f05);
11357                 MP_WritePhyUshort(sc, 0x15, 0x0015);
11358                 MP_WritePhyUshort(sc, 0x19, 0x5420);
11359                 MP_WritePhyUshort(sc, 0x15, 0x0016);
11360                 MP_WritePhyUshort(sc, 0x19, 0x58ce);
11361                 MP_WritePhyUshort(sc, 0x15, 0x0017);
11362                 MP_WritePhyUshort(sc, 0x19, 0x5cf3);
11363                 MP_WritePhyUshort(sc, 0x15, 0x0018);
11364                 MP_WritePhyUshort(sc, 0x19, 0xb600);
11365                 MP_WritePhyUshort(sc, 0x15, 0x0019);
11366                 MP_WritePhyUshort(sc, 0x19, 0xc659);
11367                 MP_WritePhyUshort(sc, 0x15, 0x001a);
11368                 MP_WritePhyUshort(sc, 0x19, 0x0018);
11369                 MP_WritePhyUshort(sc, 0x15, 0x001b);
11370                 MP_WritePhyUshort(sc, 0x19, 0xc403);
11371                 MP_WritePhyUshort(sc, 0x15, 0x001c);
11372                 MP_WritePhyUshort(sc, 0x19, 0x0016);
11373                 MP_WritePhyUshort(sc, 0x15, 0x001d);
11374                 MP_WritePhyUshort(sc, 0x19, 0xaa05);
11375                 MP_WritePhyUshort(sc, 0x15, 0x001e);
11376                 MP_WritePhyUshort(sc, 0x19, 0xc503);
11377                 MP_WritePhyUshort(sc, 0x15, 0x001f);
11378                 MP_WritePhyUshort(sc, 0x19, 0x0003);
11379                 MP_WritePhyUshort(sc, 0x15, 0x0020);
11380                 MP_WritePhyUshort(sc, 0x19, 0x89f8);
11381                 MP_WritePhyUshort(sc, 0x15, 0x0021);
11382                 MP_WritePhyUshort(sc, 0x19, 0x32ae);
11383                 MP_WritePhyUshort(sc, 0x15, 0x0022);
11384                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
11385                 MP_WritePhyUshort(sc, 0x15, 0x0023);
11386                 MP_WritePhyUshort(sc, 0x19, 0x6c03);
11387                 MP_WritePhyUshort(sc, 0x15, 0x0024);
11388                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
11389                 MP_WritePhyUshort(sc, 0x15, 0x0025);
11390                 MP_WritePhyUshort(sc, 0x19, 0x6801);
11391                 MP_WritePhyUshort(sc, 0x15, 0x0026);
11392                 MP_WritePhyUshort(sc, 0x19, 0x66a0);
11393                 MP_WritePhyUshort(sc, 0x15, 0x0027);
11394                 MP_WritePhyUshort(sc, 0x19, 0xa300);
11395                 MP_WritePhyUshort(sc, 0x15, 0x0028);
11396                 MP_WritePhyUshort(sc, 0x19, 0x64a0);
11397                 MP_WritePhyUshort(sc, 0x15, 0x0029);
11398                 MP_WritePhyUshort(sc, 0x19, 0x76f0);
11399                 MP_WritePhyUshort(sc, 0x15, 0x002a);
11400                 MP_WritePhyUshort(sc, 0x19, 0x7670);
11401                 MP_WritePhyUshort(sc, 0x15, 0x002b);
11402                 MP_WritePhyUshort(sc, 0x19, 0x7630);
11403                 MP_WritePhyUshort(sc, 0x15, 0x002c);
11404                 MP_WritePhyUshort(sc, 0x19, 0x31a6);
11405                 MP_WritePhyUshort(sc, 0x15, 0x002d);
11406                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11407                 MP_WritePhyUshort(sc, 0x15, 0x002e);
11408                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11409                 MP_WritePhyUshort(sc, 0x15, 0x002f);
11410                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11411                 MP_WritePhyUshort(sc, 0x15, 0x0030);
11412                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11413                 MP_WritePhyUshort(sc, 0x15, 0x0031);
11414                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11415                 MP_WritePhyUshort(sc, 0x15, 0x0032);
11416                 MP_WritePhyUshort(sc, 0x19, 0x4801);
11417                 MP_WritePhyUshort(sc, 0x15, 0x0033);
11418                 MP_WritePhyUshort(sc, 0x19, 0x6803);
11419                 MP_WritePhyUshort(sc, 0x15, 0x0034);
11420                 MP_WritePhyUshort(sc, 0x19, 0x66a1);
11421                 MP_WritePhyUshort(sc, 0x15, 0x0035);
11422                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
11423                 MP_WritePhyUshort(sc, 0x15, 0x0036);
11424                 MP_WritePhyUshort(sc, 0x19, 0x6c03);
11425                 MP_WritePhyUshort(sc, 0x15, 0x0037);
11426                 MP_WritePhyUshort(sc, 0x19, 0xa300);
11427                 MP_WritePhyUshort(sc, 0x15, 0x0038);
11428                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
11429                 MP_WritePhyUshort(sc, 0x15, 0x0039);
11430                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
11431                 MP_WritePhyUshort(sc, 0x15, 0x003a);
11432                 MP_WritePhyUshort(sc, 0x19, 0x74f8);
11433                 MP_WritePhyUshort(sc, 0x15, 0x003b);
11434                 MP_WritePhyUshort(sc, 0x19, 0x63d0);
11435                 MP_WritePhyUshort(sc, 0x15, 0x003c);
11436                 MP_WritePhyUshort(sc, 0x19, 0x7ff0);
11437                 MP_WritePhyUshort(sc, 0x15, 0x003d);
11438                 MP_WritePhyUshort(sc, 0x19, 0x77f0);
11439                 MP_WritePhyUshort(sc, 0x15, 0x003e);
11440                 MP_WritePhyUshort(sc, 0x19, 0x7ff0);
11441                 MP_WritePhyUshort(sc, 0x15, 0x003f);
11442                 MP_WritePhyUshort(sc, 0x19, 0x7750);
11443                 MP_WritePhyUshort(sc, 0x15, 0x0040);
11444                 MP_WritePhyUshort(sc, 0x19, 0x63d8);
11445                 MP_WritePhyUshort(sc, 0x15, 0x0041);
11446                 MP_WritePhyUshort(sc, 0x19, 0x7cf0);
11447                 MP_WritePhyUshort(sc, 0x15, 0x0042);
11448                 MP_WritePhyUshort(sc, 0x19, 0x7708);
11449                 MP_WritePhyUshort(sc, 0x15, 0x0043);
11450                 MP_WritePhyUshort(sc, 0x19, 0xa654);
11451                 MP_WritePhyUshort(sc, 0x15, 0x0044);
11452                 MP_WritePhyUshort(sc, 0x19, 0x304a);
11453                 MP_WritePhyUshort(sc, 0x15, 0x0045);
11454                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11455                 MP_WritePhyUshort(sc, 0x15, 0x0046);
11456                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11457                 MP_WritePhyUshort(sc, 0x15, 0x0047);
11458                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11459                 MP_WritePhyUshort(sc, 0x15, 0x0048);
11460                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11461                 MP_WritePhyUshort(sc, 0x15, 0x0049);
11462                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11463                 MP_WritePhyUshort(sc, 0x15, 0x004a);
11464                 MP_WritePhyUshort(sc, 0x19, 0x4802);
11465                 MP_WritePhyUshort(sc, 0x15, 0x004b);
11466                 MP_WritePhyUshort(sc, 0x19, 0x4003);
11467                 MP_WritePhyUshort(sc, 0x15, 0x004c);
11468                 MP_WritePhyUshort(sc, 0x19, 0x4440);
11469                 MP_WritePhyUshort(sc, 0x15, 0x004d);
11470                 MP_WritePhyUshort(sc, 0x19, 0x63c8);
11471                 MP_WritePhyUshort(sc, 0x15, 0x004e);
11472                 MP_WritePhyUshort(sc, 0x19, 0x6481);
11473                 MP_WritePhyUshort(sc, 0x15, 0x004f);
11474                 MP_WritePhyUshort(sc, 0x19, 0x9d00);
11475                 MP_WritePhyUshort(sc, 0x15, 0x0050);
11476                 MP_WritePhyUshort(sc, 0x19, 0x63e8);
11477                 MP_WritePhyUshort(sc, 0x15, 0x0051);
11478                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
11479                 MP_WritePhyUshort(sc, 0x15, 0x0052);
11480                 MP_WritePhyUshort(sc, 0x19, 0x5900);
11481                 MP_WritePhyUshort(sc, 0x15, 0x0053);
11482                 MP_WritePhyUshort(sc, 0x19, 0x63f8);
11483                 MP_WritePhyUshort(sc, 0x15, 0x0054);
11484                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
11485                 MP_WritePhyUshort(sc, 0x15, 0x0055);
11486                 MP_WritePhyUshort(sc, 0x19, 0x3116);
11487                 MP_WritePhyUshort(sc, 0x15, 0x0056);
11488                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11489                 MP_WritePhyUshort(sc, 0x15, 0x0057);
11490                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11491                 MP_WritePhyUshort(sc, 0x15, 0x0058);
11492                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11493                 MP_WritePhyUshort(sc, 0x15, 0x0059);
11494                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11495                 MP_WritePhyUshort(sc, 0x15, 0x005a);
11496                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
11497                 MP_WritePhyUshort(sc, 0x15, 0x005b);
11498                 MP_WritePhyUshort(sc, 0x19, 0x6c03);
11499                 MP_WritePhyUshort(sc, 0x15, 0x005c);
11500                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
11501                 MP_WritePhyUshort(sc, 0x15, 0x005d);
11502                 MP_WritePhyUshort(sc, 0x19, 0x6000);
11503                 MP_WritePhyUshort(sc, 0x15, 0x005e);
11504                 MP_WritePhyUshort(sc, 0x19, 0x59ce);
11505                 MP_WritePhyUshort(sc, 0x15, 0x005f);
11506                 MP_WritePhyUshort(sc, 0x19, 0x4400);
11507                 MP_WritePhyUshort(sc, 0x15, 0x0060);
11508                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
11509                 MP_WritePhyUshort(sc, 0x15, 0x0061);
11510                 MP_WritePhyUshort(sc, 0x19, 0x72b0);
11511                 MP_WritePhyUshort(sc, 0x15, 0x0062);
11512                 MP_WritePhyUshort(sc, 0x19, 0x400e);
11513                 MP_WritePhyUshort(sc, 0x15, 0x0063);
11514                 MP_WritePhyUshort(sc, 0x19, 0x4440);
11515                 MP_WritePhyUshort(sc, 0x15, 0x0064);
11516                 MP_WritePhyUshort(sc, 0x19, 0x9d00);
11517                 MP_WritePhyUshort(sc, 0x15, 0x0065);
11518                 MP_WritePhyUshort(sc, 0x19, 0x7f00);
11519                 MP_WritePhyUshort(sc, 0x15, 0x0066);
11520                 MP_WritePhyUshort(sc, 0x19, 0x70b0);
11521                 MP_WritePhyUshort(sc, 0x15, 0x0067);
11522                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
11523                 MP_WritePhyUshort(sc, 0x15, 0x0068);
11524                 MP_WritePhyUshort(sc, 0x19, 0x6008);
11525                 MP_WritePhyUshort(sc, 0x15, 0x0069);
11526                 MP_WritePhyUshort(sc, 0x19, 0x7cf0);
11527                 MP_WritePhyUshort(sc, 0x15, 0x006a);
11528                 MP_WritePhyUshort(sc, 0x19, 0x7750);
11529                 MP_WritePhyUshort(sc, 0x15, 0x006b);
11530                 MP_WritePhyUshort(sc, 0x19, 0x4007);
11531                 MP_WritePhyUshort(sc, 0x15, 0x006c);
11532                 MP_WritePhyUshort(sc, 0x19, 0x4500);
11533                 MP_WritePhyUshort(sc, 0x15, 0x006d);
11534                 MP_WritePhyUshort(sc, 0x19, 0x4023);
11535                 MP_WritePhyUshort(sc, 0x15, 0x006e);
11536                 MP_WritePhyUshort(sc, 0x19, 0x4580);
11537                 MP_WritePhyUshort(sc, 0x15, 0x006f);
11538                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
11539                 MP_WritePhyUshort(sc, 0x15, 0x0070);
11540                 MP_WritePhyUshort(sc, 0x19, 0xcd78);
11541                 MP_WritePhyUshort(sc, 0x15, 0x0071);
11542                 MP_WritePhyUshort(sc, 0x19, 0x0003);
11543                 MP_WritePhyUshort(sc, 0x15, 0x0072);
11544                 MP_WritePhyUshort(sc, 0x19, 0xbe02);
11545                 MP_WritePhyUshort(sc, 0x15, 0x0073);
11546                 MP_WritePhyUshort(sc, 0x19, 0x3070);
11547                 MP_WritePhyUshort(sc, 0x15, 0x0074);
11548                 MP_WritePhyUshort(sc, 0x19, 0x7cf0);
11549                 MP_WritePhyUshort(sc, 0x15, 0x0075);
11550                 MP_WritePhyUshort(sc, 0x19, 0x77f0);
11551                 MP_WritePhyUshort(sc, 0x15, 0x0076);
11552                 MP_WritePhyUshort(sc, 0x19, 0x4400);
11553                 MP_WritePhyUshort(sc, 0x15, 0x0077);
11554                 MP_WritePhyUshort(sc, 0x19, 0x4007);
11555                 MP_WritePhyUshort(sc, 0x15, 0x0078);
11556                 MP_WritePhyUshort(sc, 0x19, 0x4500);
11557                 MP_WritePhyUshort(sc, 0x15, 0x0079);
11558                 MP_WritePhyUshort(sc, 0x19, 0x4023);
11559                 MP_WritePhyUshort(sc, 0x15, 0x007a);
11560                 MP_WritePhyUshort(sc, 0x19, 0x4580);
11561                 MP_WritePhyUshort(sc, 0x15, 0x007b);
11562                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
11563                 MP_WritePhyUshort(sc, 0x15, 0x007c);
11564                 MP_WritePhyUshort(sc, 0x19, 0xce80);
11565                 MP_WritePhyUshort(sc, 0x15, 0x007d);
11566                 MP_WritePhyUshort(sc, 0x19, 0x0004);
11567                 MP_WritePhyUshort(sc, 0x15, 0x007e);
11568                 MP_WritePhyUshort(sc, 0x19, 0xce80);
11569                 MP_WritePhyUshort(sc, 0x15, 0x007f);
11570                 MP_WritePhyUshort(sc, 0x19, 0x0002);
11571                 MP_WritePhyUshort(sc, 0x15, 0x0080);
11572                 MP_WritePhyUshort(sc, 0x19, 0x307c);
11573                 MP_WritePhyUshort(sc, 0x15, 0x0081);
11574                 MP_WritePhyUshort(sc, 0x19, 0x4400);
11575                 MP_WritePhyUshort(sc, 0x15, 0x0082);
11576                 MP_WritePhyUshort(sc, 0x19, 0x480f);
11577                 MP_WritePhyUshort(sc, 0x15, 0x0083);
11578                 MP_WritePhyUshort(sc, 0x19, 0x6802);
11579                 MP_WritePhyUshort(sc, 0x15, 0x0084);
11580                 MP_WritePhyUshort(sc, 0x19, 0x6680);
11581                 MP_WritePhyUshort(sc, 0x15, 0x0085);
11582                 MP_WritePhyUshort(sc, 0x19, 0x7c10);
11583                 MP_WritePhyUshort(sc, 0x15, 0x0086);
11584                 MP_WritePhyUshort(sc, 0x19, 0x6010);
11585                 MP_WritePhyUshort(sc, 0x15, 0x0087);
11586                 MP_WritePhyUshort(sc, 0x19, 0x400a);
11587                 MP_WritePhyUshort(sc, 0x15, 0x0088);
11588                 MP_WritePhyUshort(sc, 0x19, 0x4580);
11589                 MP_WritePhyUshort(sc, 0x15, 0x0089);
11590                 MP_WritePhyUshort(sc, 0x19, 0x9e00);
11591                 MP_WritePhyUshort(sc, 0x15, 0x008a);
11592                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
11593                 MP_WritePhyUshort(sc, 0x15, 0x008b);
11594                 MP_WritePhyUshort(sc, 0x19, 0x5800);
11595                 MP_WritePhyUshort(sc, 0x15, 0x008c);
11596                 MP_WritePhyUshort(sc, 0x19, 0x63c8);
11597                 MP_WritePhyUshort(sc, 0x15, 0x008d);
11598                 MP_WritePhyUshort(sc, 0x19, 0x63d8);
11599                 MP_WritePhyUshort(sc, 0x15, 0x008e);
11600                 MP_WritePhyUshort(sc, 0x19, 0x66a0);
11601                 MP_WritePhyUshort(sc, 0x15, 0x008f);
11602                 MP_WritePhyUshort(sc, 0x19, 0x8300);
11603                 MP_WritePhyUshort(sc, 0x15, 0x0090);
11604                 MP_WritePhyUshort(sc, 0x19, 0x7ff0);
11605                 MP_WritePhyUshort(sc, 0x15, 0x0091);
11606                 MP_WritePhyUshort(sc, 0x19, 0x74f0);
11607                 MP_WritePhyUshort(sc, 0x15, 0x0092);
11608                 MP_WritePhyUshort(sc, 0x19, 0x3006);
11609                 MP_WritePhyUshort(sc, 0x15, 0x0093);
11610                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11611                 MP_WritePhyUshort(sc, 0x15, 0x0094);
11612                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11613                 MP_WritePhyUshort(sc, 0x15, 0x0095);
11614                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11615                 MP_WritePhyUshort(sc, 0x15, 0x0096);
11616                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11617                 MP_WritePhyUshort(sc, 0x15, 0x0097);
11618                 MP_WritePhyUshort(sc, 0x19, 0x4803);
11619                 MP_WritePhyUshort(sc, 0x15, 0x0098);
11620                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
11621                 MP_WritePhyUshort(sc, 0x15, 0x0099);
11622                 MP_WritePhyUshort(sc, 0x19, 0x6c03);
11623                 MP_WritePhyUshort(sc, 0x15, 0x009a);
11624                 MP_WritePhyUshort(sc, 0x19, 0xa203);
11625                 MP_WritePhyUshort(sc, 0x15, 0x009b);
11626                 MP_WritePhyUshort(sc, 0x19, 0x64b1);
11627                 MP_WritePhyUshort(sc, 0x15, 0x009c);
11628                 MP_WritePhyUshort(sc, 0x19, 0x309e);
11629                 MP_WritePhyUshort(sc, 0x15, 0x009d);
11630                 MP_WritePhyUshort(sc, 0x19, 0x64b3);
11631                 MP_WritePhyUshort(sc, 0x15, 0x009e);
11632                 MP_WritePhyUshort(sc, 0x19, 0x4030);
11633                 MP_WritePhyUshort(sc, 0x15, 0x009f);
11634                 MP_WritePhyUshort(sc, 0x19, 0x440e);
11635                 MP_WritePhyUshort(sc, 0x15, 0x00a0);
11636                 MP_WritePhyUshort(sc, 0x19, 0x4020);
11637                 MP_WritePhyUshort(sc, 0x15, 0x00a1);
11638                 MP_WritePhyUshort(sc, 0x19, 0x4419);
11639                 MP_WritePhyUshort(sc, 0x15, 0x00a2);
11640                 MP_WritePhyUshort(sc, 0x19, 0x7801);
11641                 MP_WritePhyUshort(sc, 0x15, 0x00a3);
11642                 MP_WritePhyUshort(sc, 0x19, 0xc520);
11643                 MP_WritePhyUshort(sc, 0x15, 0x00a4);
11644                 MP_WritePhyUshort(sc, 0x19, 0x000b);
11645                 MP_WritePhyUshort(sc, 0x15, 0x00a5);
11646                 MP_WritePhyUshort(sc, 0x19, 0x4020);
11647                 MP_WritePhyUshort(sc, 0x15, 0x00a6);
11648                 MP_WritePhyUshort(sc, 0x19, 0x7800);
11649                 MP_WritePhyUshort(sc, 0x15, 0x00a7);
11650                 MP_WritePhyUshort(sc, 0x19, 0x58a4);
11651                 MP_WritePhyUshort(sc, 0x15, 0x00a8);
11652                 MP_WritePhyUshort(sc, 0x19, 0x63da);
11653                 MP_WritePhyUshort(sc, 0x15, 0x00a9);
11654                 MP_WritePhyUshort(sc, 0x19, 0x5cb0);
11655                 MP_WritePhyUshort(sc, 0x15, 0x00aa);
11656                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
11657                 MP_WritePhyUshort(sc, 0x15, 0x00ab);
11658                 MP_WritePhyUshort(sc, 0x19, 0x72b0);
11659                 MP_WritePhyUshort(sc, 0x15, 0x00ac);
11660                 MP_WritePhyUshort(sc, 0x19, 0x7f00);
11661                 MP_WritePhyUshort(sc, 0x15, 0x00ad);
11662                 MP_WritePhyUshort(sc, 0x19, 0x70b0);
11663                 MP_WritePhyUshort(sc, 0x15, 0x00ae);
11664                 MP_WritePhyUshort(sc, 0x19, 0x30b8);
11665                 MP_WritePhyUshort(sc, 0x15, 0x00AF);
11666                 MP_WritePhyUshort(sc, 0x19, 0x4060);
11667                 MP_WritePhyUshort(sc, 0x15, 0x00B0);
11668                 MP_WritePhyUshort(sc, 0x19, 0x7800);
11669                 MP_WritePhyUshort(sc, 0x15, 0x00B1);
11670                 MP_WritePhyUshort(sc, 0x19, 0x7e00);
11671                 MP_WritePhyUshort(sc, 0x15, 0x00B2);
11672                 MP_WritePhyUshort(sc, 0x19, 0x72B0);
11673                 MP_WritePhyUshort(sc, 0x15, 0x00B3);
11674                 MP_WritePhyUshort(sc, 0x19, 0x7F00);
11675                 MP_WritePhyUshort(sc, 0x15, 0x00B4);
11676                 MP_WritePhyUshort(sc, 0x19, 0x73B0);
11677                 MP_WritePhyUshort(sc, 0x15, 0x00b5);
11678                 MP_WritePhyUshort(sc, 0x19, 0x58a0);
11679                 MP_WritePhyUshort(sc, 0x15, 0x00b6);
11680                 MP_WritePhyUshort(sc, 0x19, 0x63d2);
11681                 MP_WritePhyUshort(sc, 0x15, 0x00b7);
11682                 MP_WritePhyUshort(sc, 0x19, 0x5c00);
11683                 MP_WritePhyUshort(sc, 0x15, 0x00b8);
11684                 MP_WritePhyUshort(sc, 0x19, 0x5780);
11685                 MP_WritePhyUshort(sc, 0x15, 0x00b9);
11686                 MP_WritePhyUshort(sc, 0x19, 0xb60d);
11687                 MP_WritePhyUshort(sc, 0x15, 0x00ba);
11688                 MP_WritePhyUshort(sc, 0x19, 0x9bff);
11689                 MP_WritePhyUshort(sc, 0x15, 0x00bb);
11690                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
11691                 MP_WritePhyUshort(sc, 0x15, 0x00bc);
11692                 MP_WritePhyUshort(sc, 0x19, 0x6001);
11693                 MP_WritePhyUshort(sc, 0x15, 0x00bd);
11694                 MP_WritePhyUshort(sc, 0x19, 0xc020);
11695                 MP_WritePhyUshort(sc, 0x15, 0x00be);
11696                 MP_WritePhyUshort(sc, 0x19, 0x002b);
11697                 MP_WritePhyUshort(sc, 0x15, 0x00bf);
11698                 MP_WritePhyUshort(sc, 0x19, 0xc137);
11699                 MP_WritePhyUshort(sc, 0x15, 0x00c0);
11700                 MP_WritePhyUshort(sc, 0x19, 0x0006);
11701                 MP_WritePhyUshort(sc, 0x15, 0x00c1);
11702                 MP_WritePhyUshort(sc, 0x19, 0x9af8);
11703                 MP_WritePhyUshort(sc, 0x15, 0x00c2);
11704                 MP_WritePhyUshort(sc, 0x19, 0x30c6);
11705                 MP_WritePhyUshort(sc, 0x15, 0x00c3);
11706                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11707                 MP_WritePhyUshort(sc, 0x15, 0x00c4);
11708                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11709                 MP_WritePhyUshort(sc, 0x15, 0x00c5);
11710                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11711                 MP_WritePhyUshort(sc, 0x15, 0x00c6);
11712                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
11713                 MP_WritePhyUshort(sc, 0x15, 0x00c7);
11714                 MP_WritePhyUshort(sc, 0x19, 0x70b0);
11715                 MP_WritePhyUshort(sc, 0x15, 0x00c8);
11716                 MP_WritePhyUshort(sc, 0x19, 0x4400);
11717                 MP_WritePhyUshort(sc, 0x15, 0x00c9);
11718                 MP_WritePhyUshort(sc, 0x19, 0x4804);
11719                 MP_WritePhyUshort(sc, 0x15, 0x00ca);
11720                 MP_WritePhyUshort(sc, 0x19, 0x7c80);
11721                 MP_WritePhyUshort(sc, 0x15, 0x00cb);
11722                 MP_WritePhyUshort(sc, 0x19, 0x5c80);
11723                 MP_WritePhyUshort(sc, 0x15, 0x00cc);
11724                 MP_WritePhyUshort(sc, 0x19, 0x4010);
11725                 MP_WritePhyUshort(sc, 0x15, 0x00cd);
11726                 MP_WritePhyUshort(sc, 0x19, 0x4415);
11727                 MP_WritePhyUshort(sc, 0x15, 0x00ce);
11728                 MP_WritePhyUshort(sc, 0x19, 0x9b00);
11729                 MP_WritePhyUshort(sc, 0x15, 0x00cf);
11730                 MP_WritePhyUshort(sc, 0x19, 0x7f00);
11731                 MP_WritePhyUshort(sc, 0x15, 0x00d0);
11732                 MP_WritePhyUshort(sc, 0x19, 0x70b0);
11733                 MP_WritePhyUshort(sc, 0x15, 0x00d1);
11734                 MP_WritePhyUshort(sc, 0x19, 0x3177);
11735                 MP_WritePhyUshort(sc, 0x15, 0x00d2);
11736                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11737                 MP_WritePhyUshort(sc, 0x15, 0x00d3);
11738                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11739                 MP_WritePhyUshort(sc, 0x15, 0x00d4);
11740                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11741                 MP_WritePhyUshort(sc, 0x15, 0x00d5);
11742                 MP_WritePhyUshort(sc, 0x19, 0x4808);
11743                 MP_WritePhyUshort(sc, 0x15, 0x00d6);
11744                 MP_WritePhyUshort(sc, 0x19, 0x4007);
11745                 MP_WritePhyUshort(sc, 0x15, 0x00d7);
11746                 MP_WritePhyUshort(sc, 0x19, 0x4420);
11747                 MP_WritePhyUshort(sc, 0x15, 0x00d8);
11748                 MP_WritePhyUshort(sc, 0x19, 0x63d8);
11749                 MP_WritePhyUshort(sc, 0x15, 0x00d9);
11750                 MP_WritePhyUshort(sc, 0x19, 0xb608);
11751                 MP_WritePhyUshort(sc, 0x15, 0x00da);
11752                 MP_WritePhyUshort(sc, 0x19, 0xbcbd);
11753                 MP_WritePhyUshort(sc, 0x15, 0x00db);
11754                 MP_WritePhyUshort(sc, 0x19, 0xc60b);
11755                 MP_WritePhyUshort(sc, 0x15, 0x00dc);
11756                 MP_WritePhyUshort(sc, 0x19, 0x00fd);
11757                 MP_WritePhyUshort(sc, 0x15, 0x00dd);
11758                 MP_WritePhyUshort(sc, 0x19, 0x30e1);
11759                 MP_WritePhyUshort(sc, 0x15, 0x00de);
11760                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11761                 MP_WritePhyUshort(sc, 0x15, 0x00df);
11762                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11763                 MP_WritePhyUshort(sc, 0x15, 0x00e0);
11764                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11765                 MP_WritePhyUshort(sc, 0x15, 0x00e1);
11766                 MP_WritePhyUshort(sc, 0x19, 0x4809);
11767                 MP_WritePhyUshort(sc, 0x15, 0x00e2);
11768                 MP_WritePhyUshort(sc, 0x19, 0x7e40);
11769                 MP_WritePhyUshort(sc, 0x15, 0x00e3);
11770                 MP_WritePhyUshort(sc, 0x19, 0x5a40);
11771                 MP_WritePhyUshort(sc, 0x15, 0x00e4);
11772                 MP_WritePhyUshort(sc, 0x19, 0x305a);
11773                 MP_WritePhyUshort(sc, 0x15, 0x00e5);
11774                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11775                 MP_WritePhyUshort(sc, 0x15, 0x00e6);
11776                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11777                 MP_WritePhyUshort(sc, 0x15, 0x00e7);
11778                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11779                 MP_WritePhyUshort(sc, 0x15, 0x00e8);
11780                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11781                 MP_WritePhyUshort(sc, 0x15, 0x00e9);
11782                 MP_WritePhyUshort(sc, 0x19, 0x480a);
11783                 MP_WritePhyUshort(sc, 0x15, 0x00ea);
11784                 MP_WritePhyUshort(sc, 0x19, 0x5820);
11785                 MP_WritePhyUshort(sc, 0x15, 0x00eb);
11786                 MP_WritePhyUshort(sc, 0x19, 0x6c03);
11787                 MP_WritePhyUshort(sc, 0x15, 0x00ec);
11788                 MP_WritePhyUshort(sc, 0x19, 0xb60a);
11789                 MP_WritePhyUshort(sc, 0x15, 0x00ed);
11790                 MP_WritePhyUshort(sc, 0x19, 0xda07);
11791                 MP_WritePhyUshort(sc, 0x15, 0x00ee);
11792                 MP_WritePhyUshort(sc, 0x19, 0x0008);
11793                 MP_WritePhyUshort(sc, 0x15, 0x00ef);
11794                 MP_WritePhyUshort(sc, 0x19, 0xc60b);
11795                 MP_WritePhyUshort(sc, 0x15, 0x00f0);
11796                 MP_WritePhyUshort(sc, 0x19, 0x00fc);
11797                 MP_WritePhyUshort(sc, 0x15, 0x00f1);
11798                 MP_WritePhyUshort(sc, 0x19, 0x30f6);
11799                 MP_WritePhyUshort(sc, 0x15, 0x00f2);
11800                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11801                 MP_WritePhyUshort(sc, 0x15, 0x00f3);
11802                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11803                 MP_WritePhyUshort(sc, 0x15, 0x00f4);
11804                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11805                 MP_WritePhyUshort(sc, 0x15, 0x00f5);
11806                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11807                 MP_WritePhyUshort(sc, 0x15, 0x00f6);
11808                 MP_WritePhyUshort(sc, 0x19, 0x4408);
11809                 MP_WritePhyUshort(sc, 0x15, 0x00f7);
11810                 MP_WritePhyUshort(sc, 0x19, 0x480b);
11811                 MP_WritePhyUshort(sc, 0x15, 0x00f8);
11812                 MP_WritePhyUshort(sc, 0x19, 0x6f03);
11813                 MP_WritePhyUshort(sc, 0x15, 0x00f9);
11814                 MP_WritePhyUshort(sc, 0x19, 0x405f);
11815                 MP_WritePhyUshort(sc, 0x15, 0x00fa);
11816                 MP_WritePhyUshort(sc, 0x19, 0x4448);
11817                 MP_WritePhyUshort(sc, 0x15, 0x00fb);
11818                 MP_WritePhyUshort(sc, 0x19, 0x4020);
11819                 MP_WritePhyUshort(sc, 0x15, 0x00fc);
11820                 MP_WritePhyUshort(sc, 0x19, 0x4468);
11821                 MP_WritePhyUshort(sc, 0x15, 0x00fd);
11822                 MP_WritePhyUshort(sc, 0x19, 0x9c03);
11823                 MP_WritePhyUshort(sc, 0x15, 0x00fe);
11824                 MP_WritePhyUshort(sc, 0x19, 0x6f07);
11825                 MP_WritePhyUshort(sc, 0x15, 0x00ff);
11826                 MP_WritePhyUshort(sc, 0x19, 0x58a0);
11827                 MP_WritePhyUshort(sc, 0x15, 0x0100);
11828                 MP_WritePhyUshort(sc, 0x19, 0xd6d1);
11829                 MP_WritePhyUshort(sc, 0x15, 0x0101);
11830                 MP_WritePhyUshort(sc, 0x19, 0x0004);
11831                 MP_WritePhyUshort(sc, 0x15, 0x0102);
11832                 MP_WritePhyUshort(sc, 0x19, 0xc137);
11833                 MP_WritePhyUshort(sc, 0x15, 0x0103);
11834                 MP_WritePhyUshort(sc, 0x19, 0x0002);
11835                 MP_WritePhyUshort(sc, 0x15, 0x0104);
11836                 MP_WritePhyUshort(sc, 0x19, 0xa0e5);
11837                 MP_WritePhyUshort(sc, 0x15, 0x0105);
11838                 MP_WritePhyUshort(sc, 0x19, 0x9df8);
11839                 MP_WritePhyUshort(sc, 0x15, 0x0106);
11840                 MP_WritePhyUshort(sc, 0x19, 0x30c6);
11841                 MP_WritePhyUshort(sc, 0x15, 0x0107);
11842                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11843                 MP_WritePhyUshort(sc, 0x15, 0x0108);
11844                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11845                 MP_WritePhyUshort(sc, 0x15, 0x0109);
11846                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11847                 MP_WritePhyUshort(sc, 0x15, 0x010a);
11848                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11849                 MP_WritePhyUshort(sc, 0x15, 0x010b);
11850                 MP_WritePhyUshort(sc, 0x19, 0x4808);
11851                 MP_WritePhyUshort(sc, 0x15, 0x010c);
11852                 MP_WritePhyUshort(sc, 0x19, 0xc32d);
11853                 MP_WritePhyUshort(sc, 0x15, 0x010d);
11854                 MP_WritePhyUshort(sc, 0x19, 0x0003);
11855                 MP_WritePhyUshort(sc, 0x15, 0x010e);
11856                 MP_WritePhyUshort(sc, 0x19, 0xc8b3);
11857                 MP_WritePhyUshort(sc, 0x15, 0x010f);
11858                 MP_WritePhyUshort(sc, 0x19, 0x00fc);
11859                 MP_WritePhyUshort(sc, 0x15, 0x0110);
11860                 MP_WritePhyUshort(sc, 0x19, 0x4400);
11861                 MP_WritePhyUshort(sc, 0x15, 0x0111);
11862                 MP_WritePhyUshort(sc, 0x19, 0x3116);
11863                 MP_WritePhyUshort(sc, 0x15, 0x0112);
11864                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11865                 MP_WritePhyUshort(sc, 0x15, 0x0113);
11866                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11867                 MP_WritePhyUshort(sc, 0x15, 0x0114);
11868                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11869                 MP_WritePhyUshort(sc, 0x15, 0x0115);
11870                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11871                 MP_WritePhyUshort(sc, 0x15, 0x0116);
11872                 MP_WritePhyUshort(sc, 0x19, 0x4803);
11873                 MP_WritePhyUshort(sc, 0x15, 0x0117);
11874                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
11875                 MP_WritePhyUshort(sc, 0x15, 0x0118);
11876                 MP_WritePhyUshort(sc, 0x19, 0x6c02);
11877                 MP_WritePhyUshort(sc, 0x15, 0x0119);
11878                 MP_WritePhyUshort(sc, 0x19, 0x7c04);
11879                 MP_WritePhyUshort(sc, 0x15, 0x011a);
11880                 MP_WritePhyUshort(sc, 0x19, 0x6000);
11881                 MP_WritePhyUshort(sc, 0x15, 0x011b);
11882                 MP_WritePhyUshort(sc, 0x19, 0x5cf7);
11883                 MP_WritePhyUshort(sc, 0x15, 0x011c);
11884                 MP_WritePhyUshort(sc, 0x19, 0x7c2a);
11885                 MP_WritePhyUshort(sc, 0x15, 0x011d);
11886                 MP_WritePhyUshort(sc, 0x19, 0x5800);
11887                 MP_WritePhyUshort(sc, 0x15, 0x011e);
11888                 MP_WritePhyUshort(sc, 0x19, 0x5400);
11889                 MP_WritePhyUshort(sc, 0x15, 0x011f);
11890                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
11891                 MP_WritePhyUshort(sc, 0x15, 0x0120);
11892                 MP_WritePhyUshort(sc, 0x19, 0x74f0);
11893                 MP_WritePhyUshort(sc, 0x15, 0x0121);
11894                 MP_WritePhyUshort(sc, 0x19, 0x4019);
11895                 MP_WritePhyUshort(sc, 0x15, 0x0122);
11896                 MP_WritePhyUshort(sc, 0x19, 0x440d);
11897                 MP_WritePhyUshort(sc, 0x15, 0x0123);
11898                 MP_WritePhyUshort(sc, 0x19, 0xb6c1);
11899                 MP_WritePhyUshort(sc, 0x15, 0x0124);
11900                 MP_WritePhyUshort(sc, 0x19, 0xc05b);
11901                 MP_WritePhyUshort(sc, 0x15, 0x0125);
11902                 MP_WritePhyUshort(sc, 0x19, 0x00bf);
11903                 MP_WritePhyUshort(sc, 0x15, 0x0126);
11904                 MP_WritePhyUshort(sc, 0x19, 0xc025);
11905                 MP_WritePhyUshort(sc, 0x15, 0x0127);
11906                 MP_WritePhyUshort(sc, 0x19, 0x00bd);
11907                 MP_WritePhyUshort(sc, 0x15, 0x0128);
11908                 MP_WritePhyUshort(sc, 0x19, 0xc603);
11909                 MP_WritePhyUshort(sc, 0x15, 0x0129);
11910                 MP_WritePhyUshort(sc, 0x19, 0x00bb);
11911                 MP_WritePhyUshort(sc, 0x15, 0x012a);
11912                 MP_WritePhyUshort(sc, 0x19, 0x8805);
11913                 MP_WritePhyUshort(sc, 0x15, 0x012b);
11914                 MP_WritePhyUshort(sc, 0x19, 0x7801);
11915                 MP_WritePhyUshort(sc, 0x15, 0x012c);
11916                 MP_WritePhyUshort(sc, 0x19, 0x4001);
11917                 MP_WritePhyUshort(sc, 0x15, 0x012d);
11918                 MP_WritePhyUshort(sc, 0x19, 0x7800);
11919                 MP_WritePhyUshort(sc, 0x15, 0x012e);
11920                 MP_WritePhyUshort(sc, 0x19, 0xa3dd);
11921                 MP_WritePhyUshort(sc, 0x15, 0x012f);
11922                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
11923                 MP_WritePhyUshort(sc, 0x15, 0x0130);
11924                 MP_WritePhyUshort(sc, 0x19, 0x6c03);
11925                 MP_WritePhyUshort(sc, 0x15, 0x0131);
11926                 MP_WritePhyUshort(sc, 0x19, 0x8407);
11927                 MP_WritePhyUshort(sc, 0x15, 0x0132);
11928                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
11929                 MP_WritePhyUshort(sc, 0x15, 0x0133);
11930                 MP_WritePhyUshort(sc, 0x19, 0x6c02);
11931                 MP_WritePhyUshort(sc, 0x15, 0x0134);
11932                 MP_WritePhyUshort(sc, 0x19, 0xd9b8);
11933                 MP_WritePhyUshort(sc, 0x15, 0x0135);
11934                 MP_WritePhyUshort(sc, 0x19, 0x0003);
11935                 MP_WritePhyUshort(sc, 0x15, 0x0136);
11936                 MP_WritePhyUshort(sc, 0x19, 0xc240);
11937                 MP_WritePhyUshort(sc, 0x15, 0x0137);
11938                 MP_WritePhyUshort(sc, 0x19, 0x0015);
11939                 MP_WritePhyUshort(sc, 0x15, 0x0138);
11940                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
11941                 MP_WritePhyUshort(sc, 0x15, 0x0139);
11942                 MP_WritePhyUshort(sc, 0x19, 0x6c02);
11943                 MP_WritePhyUshort(sc, 0x15, 0x013a);
11944                 MP_WritePhyUshort(sc, 0x19, 0x9ae9);
11945                 MP_WritePhyUshort(sc, 0x15, 0x013b);
11946                 MP_WritePhyUshort(sc, 0x19, 0x3140);
11947                 MP_WritePhyUshort(sc, 0x15, 0x013c);
11948                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11949                 MP_WritePhyUshort(sc, 0x15, 0x013d);
11950                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11951                 MP_WritePhyUshort(sc, 0x15, 0x013e);
11952                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11953                 MP_WritePhyUshort(sc, 0x15, 0x013f);
11954                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11955                 MP_WritePhyUshort(sc, 0x15, 0x0140);
11956                 MP_WritePhyUshort(sc, 0x19, 0x4807);
11957                 MP_WritePhyUshort(sc, 0x15, 0x0141);
11958                 MP_WritePhyUshort(sc, 0x19, 0x4004);
11959                 MP_WritePhyUshort(sc, 0x15, 0x0142);
11960                 MP_WritePhyUshort(sc, 0x19, 0x4410);
11961                 MP_WritePhyUshort(sc, 0x15, 0x0143);
11962                 MP_WritePhyUshort(sc, 0x19, 0x7c0c);
11963                 MP_WritePhyUshort(sc, 0x15, 0x0144);
11964                 MP_WritePhyUshort(sc, 0x19, 0x600c);
11965                 MP_WritePhyUshort(sc, 0x15, 0x0145);
11966                 MP_WritePhyUshort(sc, 0x19, 0x9b00);
11967                 MP_WritePhyUshort(sc, 0x15, 0x0146);
11968                 MP_WritePhyUshort(sc, 0x19, 0xa68f);
11969                 MP_WritePhyUshort(sc, 0x15, 0x0147);
11970                 MP_WritePhyUshort(sc, 0x19, 0x3116);
11971                 MP_WritePhyUshort(sc, 0x15, 0x0148);
11972                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11973                 MP_WritePhyUshort(sc, 0x15, 0x0149);
11974                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11975                 MP_WritePhyUshort(sc, 0x15, 0x014a);
11976                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11977                 MP_WritePhyUshort(sc, 0x15, 0x014b);
11978                 MP_WritePhyUshort(sc, 0x19, 0x0000);
11979                 MP_WritePhyUshort(sc, 0x15, 0x014c);
11980                 MP_WritePhyUshort(sc, 0x19, 0x4804);
11981                 MP_WritePhyUshort(sc, 0x15, 0x014d);
11982                 MP_WritePhyUshort(sc, 0x19, 0x54c0);
11983                 MP_WritePhyUshort(sc, 0x15, 0x014e);
11984                 MP_WritePhyUshort(sc, 0x19, 0xb703);
11985                 MP_WritePhyUshort(sc, 0x15, 0x014f);
11986                 MP_WritePhyUshort(sc, 0x19, 0x5cff);
11987                 MP_WritePhyUshort(sc, 0x15, 0x0150);
11988                 MP_WritePhyUshort(sc, 0x19, 0x315f);
11989                 MP_WritePhyUshort(sc, 0x15, 0x0151);
11990                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
11991                 MP_WritePhyUshort(sc, 0x15, 0x0152);
11992                 MP_WritePhyUshort(sc, 0x19, 0x74f8);
11993                 MP_WritePhyUshort(sc, 0x15, 0x0153);
11994                 MP_WritePhyUshort(sc, 0x19, 0x6421);
11995                 MP_WritePhyUshort(sc, 0x15, 0x0154);
11996                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
11997                 MP_WritePhyUshort(sc, 0x15, 0x0155);
11998                 MP_WritePhyUshort(sc, 0x19, 0x6000);
11999                 MP_WritePhyUshort(sc, 0x15, 0x0156);
12000                 MP_WritePhyUshort(sc, 0x19, 0x4003);
12001                 MP_WritePhyUshort(sc, 0x15, 0x0157);
12002                 MP_WritePhyUshort(sc, 0x19, 0x4418);
12003                 MP_WritePhyUshort(sc, 0x15, 0x0158);
12004                 MP_WritePhyUshort(sc, 0x19, 0x9b00);
12005                 MP_WritePhyUshort(sc, 0x15, 0x0159);
12006                 MP_WritePhyUshort(sc, 0x19, 0x6461);
12007                 MP_WritePhyUshort(sc, 0x15, 0x015a);
12008                 MP_WritePhyUshort(sc, 0x19, 0x64e1);
12009                 MP_WritePhyUshort(sc, 0x15, 0x015b);
12010                 MP_WritePhyUshort(sc, 0x19, 0x7c20);
12011                 MP_WritePhyUshort(sc, 0x15, 0x015c);
12012                 MP_WritePhyUshort(sc, 0x19, 0x5820);
12013                 MP_WritePhyUshort(sc, 0x15, 0x015d);
12014                 MP_WritePhyUshort(sc, 0x19, 0x5ccf);
12015                 MP_WritePhyUshort(sc, 0x15, 0x015e);
12016                 MP_WritePhyUshort(sc, 0x19, 0x7050);
12017                 MP_WritePhyUshort(sc, 0x15, 0x015f);
12018                 MP_WritePhyUshort(sc, 0x19, 0xd9b8);
12019                 MP_WritePhyUshort(sc, 0x15, 0x0160);
12020                 MP_WritePhyUshort(sc, 0x19, 0x0008);
12021                 MP_WritePhyUshort(sc, 0x15, 0x0161);
12022                 MP_WritePhyUshort(sc, 0x19, 0xdab1);
12023                 MP_WritePhyUshort(sc, 0x15, 0x0162);
12024                 MP_WritePhyUshort(sc, 0x19, 0x0015);
12025                 MP_WritePhyUshort(sc, 0x15, 0x0163);
12026                 MP_WritePhyUshort(sc, 0x19, 0xc244);
12027                 MP_WritePhyUshort(sc, 0x15, 0x0164);
12028                 MP_WritePhyUshort(sc, 0x19, 0x0013);
12029                 MP_WritePhyUshort(sc, 0x15, 0x0165);
12030                 MP_WritePhyUshort(sc, 0x19, 0xc021);
12031                 MP_WritePhyUshort(sc, 0x15, 0x0166);
12032                 MP_WritePhyUshort(sc, 0x19, 0x00f9);
12033                 MP_WritePhyUshort(sc, 0x15, 0x0167);
12034                 MP_WritePhyUshort(sc, 0x19, 0x3177);
12035                 MP_WritePhyUshort(sc, 0x15, 0x0168);
12036                 MP_WritePhyUshort(sc, 0x19, 0x5cf7);
12037                 MP_WritePhyUshort(sc, 0x15, 0x0169);
12038                 MP_WritePhyUshort(sc, 0x19, 0x4010);
12039                 MP_WritePhyUshort(sc, 0x15, 0x016a);
12040                 MP_WritePhyUshort(sc, 0x19, 0x4428);
12041                 MP_WritePhyUshort(sc, 0x15, 0x016b);
12042                 MP_WritePhyUshort(sc, 0x19, 0x9c00);
12043                 MP_WritePhyUshort(sc, 0x15, 0x016c);
12044                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
12045                 MP_WritePhyUshort(sc, 0x15, 0x016d);
12046                 MP_WritePhyUshort(sc, 0x19, 0x6008);
12047                 MP_WritePhyUshort(sc, 0x15, 0x016e);
12048                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
12049                 MP_WritePhyUshort(sc, 0x15, 0x016f);
12050                 MP_WritePhyUshort(sc, 0x19, 0x74f0);
12051                 MP_WritePhyUshort(sc, 0x15, 0x0170);
12052                 MP_WritePhyUshort(sc, 0x19, 0x6461);
12053                 MP_WritePhyUshort(sc, 0x15, 0x0171);
12054                 MP_WritePhyUshort(sc, 0x19, 0x6421);
12055                 MP_WritePhyUshort(sc, 0x15, 0x0172);
12056                 MP_WritePhyUshort(sc, 0x19, 0x64a1);
12057                 MP_WritePhyUshort(sc, 0x15, 0x0173);
12058                 MP_WritePhyUshort(sc, 0x19, 0x3116);
12059                 MP_WritePhyUshort(sc, 0x15, 0x0174);
12060                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12061                 MP_WritePhyUshort(sc, 0x15, 0x0175);
12062                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12063                 MP_WritePhyUshort(sc, 0x15, 0x0176);
12064                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12065                 MP_WritePhyUshort(sc, 0x15, 0x0177);
12066                 MP_WritePhyUshort(sc, 0x19, 0x4805);
12067                 MP_WritePhyUshort(sc, 0x15, 0x0178);
12068                 MP_WritePhyUshort(sc, 0x19, 0xa103);
12069                 MP_WritePhyUshort(sc, 0x15, 0x0179);
12070                 MP_WritePhyUshort(sc, 0x19, 0x7c02);
12071                 MP_WritePhyUshort(sc, 0x15, 0x017a);
12072                 MP_WritePhyUshort(sc, 0x19, 0x6002);
12073                 MP_WritePhyUshort(sc, 0x15, 0x017b);
12074                 MP_WritePhyUshort(sc, 0x19, 0x7e00);
12075                 MP_WritePhyUshort(sc, 0x15, 0x017c);
12076                 MP_WritePhyUshort(sc, 0x19, 0x5400);
12077                 MP_WritePhyUshort(sc, 0x15, 0x017d);
12078                 MP_WritePhyUshort(sc, 0x19, 0x7c6b);
12079                 MP_WritePhyUshort(sc, 0x15, 0x017e);
12080                 MP_WritePhyUshort(sc, 0x19, 0x5c63);
12081                 MP_WritePhyUshort(sc, 0x15, 0x017f);
12082                 MP_WritePhyUshort(sc, 0x19, 0x407d);
12083                 MP_WritePhyUshort(sc, 0x15, 0x0180);
12084                 MP_WritePhyUshort(sc, 0x19, 0xa602);
12085                 MP_WritePhyUshort(sc, 0x15, 0x0181);
12086                 MP_WritePhyUshort(sc, 0x19, 0x4001);
12087                 MP_WritePhyUshort(sc, 0x15, 0x0182);
12088                 MP_WritePhyUshort(sc, 0x19, 0x4420);
12089                 MP_WritePhyUshort(sc, 0x15, 0x0183);
12090                 MP_WritePhyUshort(sc, 0x19, 0x4020);
12091                 MP_WritePhyUshort(sc, 0x15, 0x0184);
12092                 MP_WritePhyUshort(sc, 0x19, 0x44a1);
12093                 MP_WritePhyUshort(sc, 0x15, 0x0185);
12094                 MP_WritePhyUshort(sc, 0x19, 0xd6e0);
12095                 MP_WritePhyUshort(sc, 0x15, 0x0186);
12096                 MP_WritePhyUshort(sc, 0x19, 0x0009);
12097                 MP_WritePhyUshort(sc, 0x15, 0x0187);
12098                 MP_WritePhyUshort(sc, 0x19, 0x9efe);
12099                 MP_WritePhyUshort(sc, 0x15, 0x0188);
12100                 MP_WritePhyUshort(sc, 0x19, 0x7c02);
12101                 MP_WritePhyUshort(sc, 0x15, 0x0189);
12102                 MP_WritePhyUshort(sc, 0x19, 0x6000);
12103                 MP_WritePhyUshort(sc, 0x15, 0x018a);
12104                 MP_WritePhyUshort(sc, 0x19, 0x9c00);
12105                 MP_WritePhyUshort(sc, 0x15, 0x018b);
12106                 MP_WritePhyUshort(sc, 0x19, 0x318f);
12107                 MP_WritePhyUshort(sc, 0x15, 0x018c);
12108                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12109                 MP_WritePhyUshort(sc, 0x15, 0x018d);
12110                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12111                 MP_WritePhyUshort(sc, 0x15, 0x018e);
12112                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12113                 MP_WritePhyUshort(sc, 0x15, 0x018f);
12114                 MP_WritePhyUshort(sc, 0x19, 0x4806);
12115                 MP_WritePhyUshort(sc, 0x15, 0x0190);
12116                 MP_WritePhyUshort(sc, 0x19, 0x7c10);
12117                 MP_WritePhyUshort(sc, 0x15, 0x0191);
12118                 MP_WritePhyUshort(sc, 0x19, 0x5c10);
12119                 MP_WritePhyUshort(sc, 0x15, 0x0192);
12120                 MP_WritePhyUshort(sc, 0x19, 0x40fa);
12121                 MP_WritePhyUshort(sc, 0x15, 0x0193);
12122                 MP_WritePhyUshort(sc, 0x19, 0xa602);
12123                 MP_WritePhyUshort(sc, 0x15, 0x0194);
12124                 MP_WritePhyUshort(sc, 0x19, 0x4010);
12125                 MP_WritePhyUshort(sc, 0x15, 0x0195);
12126                 MP_WritePhyUshort(sc, 0x19, 0x4440);
12127                 MP_WritePhyUshort(sc, 0x15, 0x0196);
12128                 MP_WritePhyUshort(sc, 0x19, 0x9d00);
12129                 MP_WritePhyUshort(sc, 0x15, 0x0197);
12130                 MP_WritePhyUshort(sc, 0x19, 0x7c80);
12131                 MP_WritePhyUshort(sc, 0x15, 0x0198);
12132                 MP_WritePhyUshort(sc, 0x19, 0x6400);
12133                 MP_WritePhyUshort(sc, 0x15, 0x0199);
12134                 MP_WritePhyUshort(sc, 0x19, 0x4003);
12135                 MP_WritePhyUshort(sc, 0x15, 0x019a);
12136                 MP_WritePhyUshort(sc, 0x19, 0x4540);
12137                 MP_WritePhyUshort(sc, 0x15, 0x019b);
12138                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
12139                 MP_WritePhyUshort(sc, 0x15, 0x019c);
12140                 MP_WritePhyUshort(sc, 0x19, 0x6008);
12141                 MP_WritePhyUshort(sc, 0x15, 0x019d);
12142                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
12143                 MP_WritePhyUshort(sc, 0x15, 0x019e);
12144                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
12145                 MP_WritePhyUshort(sc, 0x15, 0x019f);
12146                 MP_WritePhyUshort(sc, 0x19, 0x6400);
12147                 MP_WritePhyUshort(sc, 0x15, 0x01a0);
12148                 MP_WritePhyUshort(sc, 0x19, 0x7c80);
12149                 MP_WritePhyUshort(sc, 0x15, 0x01a1);
12150                 MP_WritePhyUshort(sc, 0x19, 0x6480);
12151                 MP_WritePhyUshort(sc, 0x15, 0x01a2);
12152                 MP_WritePhyUshort(sc, 0x19, 0x3140);
12153                 MP_WritePhyUshort(sc, 0x15, 0x01a3);
12154                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12155                 MP_WritePhyUshort(sc, 0x15, 0x01a4);
12156                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12157                 MP_WritePhyUshort(sc, 0x15, 0x01a5);
12158                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12159                 MP_WritePhyUshort(sc, 0x15, 0x01a6);
12160                 MP_WritePhyUshort(sc, 0x19, 0x4400);
12161                 MP_WritePhyUshort(sc, 0x15, 0x01a7);
12162                 MP_WritePhyUshort(sc, 0x19, 0x7c0b);
12163                 MP_WritePhyUshort(sc, 0x15, 0x01a8);
12164                 MP_WritePhyUshort(sc, 0x19, 0x6c01);
12165                 MP_WritePhyUshort(sc, 0x15, 0x01a9);
12166                 MP_WritePhyUshort(sc, 0x19, 0x64a8);
12167                 MP_WritePhyUshort(sc, 0x15, 0x01aa);
12168                 MP_WritePhyUshort(sc, 0x19, 0x6800);
12169                 MP_WritePhyUshort(sc, 0x15, 0x01ab);
12170                 MP_WritePhyUshort(sc, 0x19, 0x5cf0);
12171                 MP_WritePhyUshort(sc, 0x15, 0x01ac);
12172                 MP_WritePhyUshort(sc, 0x19, 0x588f);
12173                 MP_WritePhyUshort(sc, 0x15, 0x01ad);
12174                 MP_WritePhyUshort(sc, 0x19, 0xb628);
12175                 MP_WritePhyUshort(sc, 0x15, 0x01ae);
12176                 MP_WritePhyUshort(sc, 0x19, 0xc053);
12177                 MP_WritePhyUshort(sc, 0x15, 0x01af);
12178                 MP_WritePhyUshort(sc, 0x19, 0x0026);
12179                 MP_WritePhyUshort(sc, 0x15, 0x01b0);
12180                 MP_WritePhyUshort(sc, 0x19, 0xc02d);
12181                 MP_WritePhyUshort(sc, 0x15, 0x01b1);
12182                 MP_WritePhyUshort(sc, 0x19, 0x0024);
12183                 MP_WritePhyUshort(sc, 0x15, 0x01b2);
12184                 MP_WritePhyUshort(sc, 0x19, 0xc603);
12185                 MP_WritePhyUshort(sc, 0x15, 0x01b3);
12186                 MP_WritePhyUshort(sc, 0x19, 0x0022);
12187                 MP_WritePhyUshort(sc, 0x15, 0x01b4);
12188                 MP_WritePhyUshort(sc, 0x19, 0x8cf9);
12189                 MP_WritePhyUshort(sc, 0x15, 0x01b5);
12190                 MP_WritePhyUshort(sc, 0x19, 0x31ba);
12191                 MP_WritePhyUshort(sc, 0x15, 0x01b6);
12192                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12193                 MP_WritePhyUshort(sc, 0x15, 0x01b7);
12194                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12195                 MP_WritePhyUshort(sc, 0x15, 0x01b8);
12196                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12197                 MP_WritePhyUshort(sc, 0x15, 0x01b9);
12198                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12199                 MP_WritePhyUshort(sc, 0x15, 0x01ba);
12200                 MP_WritePhyUshort(sc, 0x19, 0x4400);
12201                 MP_WritePhyUshort(sc, 0x15, 0x01bb);
12202                 MP_WritePhyUshort(sc, 0x19, 0x5420);
12203                 MP_WritePhyUshort(sc, 0x15, 0x01bc);
12204                 MP_WritePhyUshort(sc, 0x19, 0x4811);
12205                 MP_WritePhyUshort(sc, 0x15, 0x01bd);
12206                 MP_WritePhyUshort(sc, 0x19, 0x5000);
12207                 MP_WritePhyUshort(sc, 0x15, 0x01be);
12208                 MP_WritePhyUshort(sc, 0x19, 0x4801);
12209                 MP_WritePhyUshort(sc, 0x15, 0x01bf);
12210                 MP_WritePhyUshort(sc, 0x19, 0x6800);
12211                 MP_WritePhyUshort(sc, 0x15, 0x01c0);
12212                 MP_WritePhyUshort(sc, 0x19, 0x31f5);
12213                 MP_WritePhyUshort(sc, 0x15, 0x01c1);
12214                 MP_WritePhyUshort(sc, 0x19, 0xb614);
12215                 MP_WritePhyUshort(sc, 0x15, 0x01c2);
12216                 MP_WritePhyUshort(sc, 0x19, 0x8ce4);
12217                 MP_WritePhyUshort(sc, 0x15, 0x01c3);
12218                 MP_WritePhyUshort(sc, 0x19, 0xb30c);
12219                 MP_WritePhyUshort(sc, 0x15, 0x01c4);
12220                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
12221                 MP_WritePhyUshort(sc, 0x15, 0x01c5);
12222                 MP_WritePhyUshort(sc, 0x19, 0x6c02);
12223                 MP_WritePhyUshort(sc, 0x15, 0x01c6);
12224                 MP_WritePhyUshort(sc, 0x19, 0x8206);
12225                 MP_WritePhyUshort(sc, 0x15, 0x01c7);
12226                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
12227                 MP_WritePhyUshort(sc, 0x15, 0x01c8);
12228                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12229                 MP_WritePhyUshort(sc, 0x15, 0x01c9);
12230                 MP_WritePhyUshort(sc, 0x19, 0x7c04);
12231                 MP_WritePhyUshort(sc, 0x15, 0x01ca);
12232                 MP_WritePhyUshort(sc, 0x19, 0x7404);
12233                 MP_WritePhyUshort(sc, 0x15, 0x01cb);
12234                 MP_WritePhyUshort(sc, 0x19, 0x31c0);
12235                 MP_WritePhyUshort(sc, 0x15, 0x01cc);
12236                 MP_WritePhyUshort(sc, 0x19, 0x7c04);
12237                 MP_WritePhyUshort(sc, 0x15, 0x01cd);
12238                 MP_WritePhyUshort(sc, 0x19, 0x7400);
12239                 MP_WritePhyUshort(sc, 0x15, 0x01ce);
12240                 MP_WritePhyUshort(sc, 0x19, 0x31c0);
12241                 MP_WritePhyUshort(sc, 0x15, 0x01cf);
12242                 MP_WritePhyUshort(sc, 0x19, 0x8df1);
12243                 MP_WritePhyUshort(sc, 0x15, 0x01d0);
12244                 MP_WritePhyUshort(sc, 0x19, 0x3248);
12245                 MP_WritePhyUshort(sc, 0x15, 0x01d1);
12246                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12247                 MP_WritePhyUshort(sc, 0x15, 0x01d2);
12248                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12249                 MP_WritePhyUshort(sc, 0x15, 0x01d3);
12250                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12251                 MP_WritePhyUshort(sc, 0x15, 0x01d4);
12252                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12253                 MP_WritePhyUshort(sc, 0x15, 0x01d5);
12254                 MP_WritePhyUshort(sc, 0x19, 0x4400);
12255                 MP_WritePhyUshort(sc, 0x15, 0x01d6);
12256                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
12257                 MP_WritePhyUshort(sc, 0x15, 0x01d7);
12258                 MP_WritePhyUshort(sc, 0x19, 0x6c03);
12259                 MP_WritePhyUshort(sc, 0x15, 0x01d8);
12260                 MP_WritePhyUshort(sc, 0x19, 0x7670);
12261                 MP_WritePhyUshort(sc, 0x15, 0x01d9);
12262                 MP_WritePhyUshort(sc, 0x19, 0x4023);
12263                 MP_WritePhyUshort(sc, 0x15, 0x01da);
12264                 MP_WritePhyUshort(sc, 0x19, 0x4500);
12265                 MP_WritePhyUshort(sc, 0x15, 0x01db);
12266                 MP_WritePhyUshort(sc, 0x19, 0x4069);
12267                 MP_WritePhyUshort(sc, 0x15, 0x01dc);
12268                 MP_WritePhyUshort(sc, 0x19, 0x4580);
12269                 MP_WritePhyUshort(sc, 0x15, 0x01dd);
12270                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
12271                 MP_WritePhyUshort(sc, 0x15, 0x01de);
12272                 MP_WritePhyUshort(sc, 0x19, 0xcff5);
12273                 MP_WritePhyUshort(sc, 0x15, 0x01df);
12274                 MP_WritePhyUshort(sc, 0x19, 0x00ff);
12275                 MP_WritePhyUshort(sc, 0x15, 0x01e0);
12276                 MP_WritePhyUshort(sc, 0x19, 0x76f0);
12277                 MP_WritePhyUshort(sc, 0x15, 0x01e1);
12278                 MP_WritePhyUshort(sc, 0x19, 0x4400);
12279                 MP_WritePhyUshort(sc, 0x15, 0x01e2);
12280                 MP_WritePhyUshort(sc, 0x19, 0x4023);
12281                 MP_WritePhyUshort(sc, 0x15, 0x01e3);
12282                 MP_WritePhyUshort(sc, 0x19, 0x4500);
12283                 MP_WritePhyUshort(sc, 0x15, 0x01e4);
12284                 MP_WritePhyUshort(sc, 0x19, 0x4069);
12285                 MP_WritePhyUshort(sc, 0x15, 0x01e5);
12286                 MP_WritePhyUshort(sc, 0x19, 0x4580);
12287                 MP_WritePhyUshort(sc, 0x15, 0x01e6);
12288                 MP_WritePhyUshort(sc, 0x19, 0x9f00);
12289                 MP_WritePhyUshort(sc, 0x15, 0x01e7);
12290                 MP_WritePhyUshort(sc, 0x19, 0xd0f5);
12291                 MP_WritePhyUshort(sc, 0x15, 0x01e8);
12292                 MP_WritePhyUshort(sc, 0x19, 0x00ff);
12293                 MP_WritePhyUshort(sc, 0x15, 0x01e9);
12294                 MP_WritePhyUshort(sc, 0x19, 0x4400);
12295                 MP_WritePhyUshort(sc, 0x15, 0x01ea);
12296                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
12297                 MP_WritePhyUshort(sc, 0x15, 0x01eb);
12298                 MP_WritePhyUshort(sc, 0x19, 0x6800);
12299                 MP_WritePhyUshort(sc, 0x15, 0x01ec);
12300                 MP_WritePhyUshort(sc, 0x19, 0x66a0);
12301                 MP_WritePhyUshort(sc, 0x15, 0x01ed);
12302                 MP_WritePhyUshort(sc, 0x19, 0x8300);
12303                 MP_WritePhyUshort(sc, 0x15, 0x01ee);
12304                 MP_WritePhyUshort(sc, 0x19, 0x74f0);
12305                 MP_WritePhyUshort(sc, 0x15, 0x01ef);
12306                 MP_WritePhyUshort(sc, 0x19, 0x3006);
12307                 MP_WritePhyUshort(sc, 0x15, 0x01f0);
12308                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12309                 MP_WritePhyUshort(sc, 0x15, 0x01f1);
12310                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12311                 MP_WritePhyUshort(sc, 0x15, 0x01f2);
12312                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12313                 MP_WritePhyUshort(sc, 0x15, 0x01f3);
12314                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12315                 MP_WritePhyUshort(sc, 0x15, 0x01f4);
12316                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12317                 MP_WritePhyUshort(sc, 0x15, 0x01f5);
12318                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
12319                 MP_WritePhyUshort(sc, 0x15, 0x01f6);
12320                 MP_WritePhyUshort(sc, 0x19, 0x6c02);
12321                 MP_WritePhyUshort(sc, 0x15, 0x01f7);
12322                 MP_WritePhyUshort(sc, 0x19, 0x409d);
12323                 MP_WritePhyUshort(sc, 0x15, 0x01f8);
12324                 MP_WritePhyUshort(sc, 0x19, 0x7c87);
12325                 MP_WritePhyUshort(sc, 0x15, 0x01f9);
12326                 MP_WritePhyUshort(sc, 0x19, 0xae14);
12327                 MP_WritePhyUshort(sc, 0x15, 0x01fa);
12328                 MP_WritePhyUshort(sc, 0x19, 0x4400);
12329                 MP_WritePhyUshort(sc, 0x15, 0x01fb);
12330                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
12331                 MP_WritePhyUshort(sc, 0x15, 0x01fc);
12332                 MP_WritePhyUshort(sc, 0x19, 0x6800);
12333                 MP_WritePhyUshort(sc, 0x15, 0x01fd);
12334                 MP_WritePhyUshort(sc, 0x19, 0x7801);
12335                 MP_WritePhyUshort(sc, 0x15, 0x01fe);
12336                 MP_WritePhyUshort(sc, 0x19, 0x980e);
12337                 MP_WritePhyUshort(sc, 0x15, 0x01ff);
12338                 MP_WritePhyUshort(sc, 0x19, 0x930c);
12339                 MP_WritePhyUshort(sc, 0x15, 0x0200);
12340                 MP_WritePhyUshort(sc, 0x19, 0x9206);
12341                 MP_WritePhyUshort(sc, 0x15, 0x0201);
12342                 MP_WritePhyUshort(sc, 0x19, 0x4002);
12343                 MP_WritePhyUshort(sc, 0x15, 0x0202);
12344                 MP_WritePhyUshort(sc, 0x19, 0x7800);
12345                 MP_WritePhyUshort(sc, 0x15, 0x0203);
12346                 MP_WritePhyUshort(sc, 0x19, 0x588f);
12347                 MP_WritePhyUshort(sc, 0x15, 0x0204);
12348                 MP_WritePhyUshort(sc, 0x19, 0x5520);
12349                 MP_WritePhyUshort(sc, 0x15, 0x0205);
12350                 MP_WritePhyUshort(sc, 0x19, 0x320c);
12351                 MP_WritePhyUshort(sc, 0x15, 0x0206);
12352                 MP_WritePhyUshort(sc, 0x19, 0x4000);
12353                 MP_WritePhyUshort(sc, 0x15, 0x0207);
12354                 MP_WritePhyUshort(sc, 0x19, 0x7800);
12355                 MP_WritePhyUshort(sc, 0x15, 0x0208);
12356                 MP_WritePhyUshort(sc, 0x19, 0x588d);
12357                 MP_WritePhyUshort(sc, 0x15, 0x0209);
12358                 MP_WritePhyUshort(sc, 0x19, 0x5500);
12359                 MP_WritePhyUshort(sc, 0x15, 0x020a);
12360                 MP_WritePhyUshort(sc, 0x19, 0x320c);
12361                 MP_WritePhyUshort(sc, 0x15, 0x020b);
12362                 MP_WritePhyUshort(sc, 0x19, 0x4002);
12363                 MP_WritePhyUshort(sc, 0x15, 0x020c);
12364                 MP_WritePhyUshort(sc, 0x19, 0x3220);
12365                 MP_WritePhyUshort(sc, 0x15, 0x020d);
12366                 MP_WritePhyUshort(sc, 0x19, 0x4480);
12367                 MP_WritePhyUshort(sc, 0x15, 0x020e);
12368                 MP_WritePhyUshort(sc, 0x19, 0x9e03);
12369                 MP_WritePhyUshort(sc, 0x15, 0x020f);
12370                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
12371                 MP_WritePhyUshort(sc, 0x15, 0x0210);
12372                 MP_WritePhyUshort(sc, 0x19, 0x6840);
12373                 MP_WritePhyUshort(sc, 0x15, 0x0211);
12374                 MP_WritePhyUshort(sc, 0x19, 0x7801);
12375                 MP_WritePhyUshort(sc, 0x15, 0x0212);
12376                 MP_WritePhyUshort(sc, 0x19, 0x980e);
12377                 MP_WritePhyUshort(sc, 0x15, 0x0213);
12378                 MP_WritePhyUshort(sc, 0x19, 0x930c);
12379                 MP_WritePhyUshort(sc, 0x15, 0x0214);
12380                 MP_WritePhyUshort(sc, 0x19, 0x9206);
12381                 MP_WritePhyUshort(sc, 0x15, 0x0215);
12382                 MP_WritePhyUshort(sc, 0x19, 0x4000);
12383                 MP_WritePhyUshort(sc, 0x15, 0x0216);
12384                 MP_WritePhyUshort(sc, 0x19, 0x7800);
12385                 MP_WritePhyUshort(sc, 0x15, 0x0217);
12386                 MP_WritePhyUshort(sc, 0x19, 0x588f);
12387                 MP_WritePhyUshort(sc, 0x15, 0x0218);
12388                 MP_WritePhyUshort(sc, 0x19, 0x5520);
12389                 MP_WritePhyUshort(sc, 0x15, 0x0219);
12390                 MP_WritePhyUshort(sc, 0x19, 0x3220);
12391                 MP_WritePhyUshort(sc, 0x15, 0x021a);
12392                 MP_WritePhyUshort(sc, 0x19, 0x4002);
12393                 MP_WritePhyUshort(sc, 0x15, 0x021b);
12394                 MP_WritePhyUshort(sc, 0x19, 0x7800);
12395                 MP_WritePhyUshort(sc, 0x15, 0x021c);
12396                 MP_WritePhyUshort(sc, 0x19, 0x588d);
12397                 MP_WritePhyUshort(sc, 0x15, 0x021d);
12398                 MP_WritePhyUshort(sc, 0x19, 0x5540);
12399                 MP_WritePhyUshort(sc, 0x15, 0x021e);
12400                 MP_WritePhyUshort(sc, 0x19, 0x3220);
12401                 MP_WritePhyUshort(sc, 0x15, 0x021f);
12402                 MP_WritePhyUshort(sc, 0x19, 0x4000);
12403                 MP_WritePhyUshort(sc, 0x15, 0x0220);
12404                 MP_WritePhyUshort(sc, 0x19, 0x7800);
12405                 MP_WritePhyUshort(sc, 0x15, 0x0221);
12406                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
12407                 MP_WritePhyUshort(sc, 0x15, 0x0222);
12408                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12409                 MP_WritePhyUshort(sc, 0x15, 0x0223);
12410                 MP_WritePhyUshort(sc, 0x19, 0x3231);
12411                 MP_WritePhyUshort(sc, 0x15, 0x0224);
12412                 MP_WritePhyUshort(sc, 0x19, 0xab06);
12413                 MP_WritePhyUshort(sc, 0x15, 0x0225);
12414                 MP_WritePhyUshort(sc, 0x19, 0xbf08);
12415                 MP_WritePhyUshort(sc, 0x15, 0x0226);
12416                 MP_WritePhyUshort(sc, 0x19, 0x4076);
12417                 MP_WritePhyUshort(sc, 0x15, 0x0227);
12418                 MP_WritePhyUshort(sc, 0x19, 0x7d07);
12419                 MP_WritePhyUshort(sc, 0x15, 0x0228);
12420                 MP_WritePhyUshort(sc, 0x19, 0x4502);
12421                 MP_WritePhyUshort(sc, 0x15, 0x0229);
12422                 MP_WritePhyUshort(sc, 0x19, 0x3231);
12423                 MP_WritePhyUshort(sc, 0x15, 0x022a);
12424                 MP_WritePhyUshort(sc, 0x19, 0x7d80);
12425                 MP_WritePhyUshort(sc, 0x15, 0x022b);
12426                 MP_WritePhyUshort(sc, 0x19, 0x5180);
12427                 MP_WritePhyUshort(sc, 0x15, 0x022c);
12428                 MP_WritePhyUshort(sc, 0x19, 0x322f);
12429                 MP_WritePhyUshort(sc, 0x15, 0x022d);
12430                 MP_WritePhyUshort(sc, 0x19, 0x7d80);
12431                 MP_WritePhyUshort(sc, 0x15, 0x022e);
12432                 MP_WritePhyUshort(sc, 0x19, 0x5000);
12433                 MP_WritePhyUshort(sc, 0x15, 0x022f);
12434                 MP_WritePhyUshort(sc, 0x19, 0x7d07);
12435                 MP_WritePhyUshort(sc, 0x15, 0x0230);
12436                 MP_WritePhyUshort(sc, 0x19, 0x4402);
12437                 MP_WritePhyUshort(sc, 0x15, 0x0231);
12438                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
12439                 MP_WritePhyUshort(sc, 0x15, 0x0232);
12440                 MP_WritePhyUshort(sc, 0x19, 0x6c02);
12441                 MP_WritePhyUshort(sc, 0x15, 0x0233);
12442                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
12443                 MP_WritePhyUshort(sc, 0x15, 0x0234);
12444                 MP_WritePhyUshort(sc, 0x19, 0xb309);
12445                 MP_WritePhyUshort(sc, 0x15, 0x0235);
12446                 MP_WritePhyUshort(sc, 0x19, 0xb204);
12447                 MP_WritePhyUshort(sc, 0x15, 0x0236);
12448                 MP_WritePhyUshort(sc, 0x19, 0xb105);
12449                 MP_WritePhyUshort(sc, 0x15, 0x0237);
12450                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12451                 MP_WritePhyUshort(sc, 0x15, 0x0238);
12452                 MP_WritePhyUshort(sc, 0x19, 0x31c1);
12453                 MP_WritePhyUshort(sc, 0x15, 0x0239);
12454                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12455                 MP_WritePhyUshort(sc, 0x15, 0x023a);
12456                 MP_WritePhyUshort(sc, 0x19, 0x3261);
12457                 MP_WritePhyUshort(sc, 0x15, 0x023b);
12458                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12459                 MP_WritePhyUshort(sc, 0x15, 0x023c);
12460                 MP_WritePhyUshort(sc, 0x19, 0x3250);
12461                 MP_WritePhyUshort(sc, 0x15, 0x023d);
12462                 MP_WritePhyUshort(sc, 0x19, 0xb203);
12463                 MP_WritePhyUshort(sc, 0x15, 0x023e);
12464                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12465                 MP_WritePhyUshort(sc, 0x15, 0x023f);
12466                 MP_WritePhyUshort(sc, 0x19, 0x327a);
12467                 MP_WritePhyUshort(sc, 0x15, 0x0240);
12468                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12469                 MP_WritePhyUshort(sc, 0x15, 0x0241);
12470                 MP_WritePhyUshort(sc, 0x19, 0x3293);
12471                 MP_WritePhyUshort(sc, 0x15, 0x0242);
12472                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12473                 MP_WritePhyUshort(sc, 0x15, 0x0243);
12474                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12475                 MP_WritePhyUshort(sc, 0x15, 0x0244);
12476                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12477                 MP_WritePhyUshort(sc, 0x15, 0x0245);
12478                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12479                 MP_WritePhyUshort(sc, 0x15, 0x0246);
12480                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12481                 MP_WritePhyUshort(sc, 0x15, 0x0247);
12482                 MP_WritePhyUshort(sc, 0x19, 0x32a3);
12483                 MP_WritePhyUshort(sc, 0x15, 0x0248);
12484                 MP_WritePhyUshort(sc, 0x19, 0x5520);
12485                 MP_WritePhyUshort(sc, 0x15, 0x0249);
12486                 MP_WritePhyUshort(sc, 0x19, 0x403d);
12487                 MP_WritePhyUshort(sc, 0x15, 0x024a);
12488                 MP_WritePhyUshort(sc, 0x19, 0x440c);
12489                 MP_WritePhyUshort(sc, 0x15, 0x024b);
12490                 MP_WritePhyUshort(sc, 0x19, 0x4812);
12491                 MP_WritePhyUshort(sc, 0x15, 0x024c);
12492                 MP_WritePhyUshort(sc, 0x19, 0x5001);
12493                 MP_WritePhyUshort(sc, 0x15, 0x024d);
12494                 MP_WritePhyUshort(sc, 0x19, 0x4802);
12495                 MP_WritePhyUshort(sc, 0x15, 0x024e);
12496                 MP_WritePhyUshort(sc, 0x19, 0x6880);
12497                 MP_WritePhyUshort(sc, 0x15, 0x024f);
12498                 MP_WritePhyUshort(sc, 0x19, 0x31f5);
12499                 MP_WritePhyUshort(sc, 0x15, 0x0250);
12500                 MP_WritePhyUshort(sc, 0x19, 0xb685);
12501                 MP_WritePhyUshort(sc, 0x15, 0x0251);
12502                 MP_WritePhyUshort(sc, 0x19, 0x801c);
12503                 MP_WritePhyUshort(sc, 0x15, 0x0252);
12504                 MP_WritePhyUshort(sc, 0x19, 0xbaf5);
12505                 MP_WritePhyUshort(sc, 0x15, 0x0253);
12506                 MP_WritePhyUshort(sc, 0x19, 0xc07c);
12507                 MP_WritePhyUshort(sc, 0x15, 0x0254);
12508                 MP_WritePhyUshort(sc, 0x19, 0x00fb);
12509                 MP_WritePhyUshort(sc, 0x15, 0x0255);
12510                 MP_WritePhyUshort(sc, 0x19, 0x325a);
12511                 MP_WritePhyUshort(sc, 0x15, 0x0256);
12512                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12513                 MP_WritePhyUshort(sc, 0x15, 0x0257);
12514                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12515                 MP_WritePhyUshort(sc, 0x15, 0x0258);
12516                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12517                 MP_WritePhyUshort(sc, 0x15, 0x0259);
12518                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12519                 MP_WritePhyUshort(sc, 0x15, 0x025a);
12520                 MP_WritePhyUshort(sc, 0x19, 0x481a);
12521                 MP_WritePhyUshort(sc, 0x15, 0x025b);
12522                 MP_WritePhyUshort(sc, 0x19, 0x5001);
12523                 MP_WritePhyUshort(sc, 0x15, 0x025c);
12524                 MP_WritePhyUshort(sc, 0x19, 0x401b);
12525                 MP_WritePhyUshort(sc, 0x15, 0x025d);
12526                 MP_WritePhyUshort(sc, 0x19, 0x480a);
12527                 MP_WritePhyUshort(sc, 0x15, 0x025e);
12528                 MP_WritePhyUshort(sc, 0x19, 0x4418);
12529                 MP_WritePhyUshort(sc, 0x15, 0x025f);
12530                 MP_WritePhyUshort(sc, 0x19, 0x6900);
12531                 MP_WritePhyUshort(sc, 0x15, 0x0260);
12532                 MP_WritePhyUshort(sc, 0x19, 0x31f5);
12533                 MP_WritePhyUshort(sc, 0x15, 0x0261);
12534                 MP_WritePhyUshort(sc, 0x19, 0xb64b);
12535                 MP_WritePhyUshort(sc, 0x15, 0x0262);
12536                 MP_WritePhyUshort(sc, 0x19, 0xdb00);
12537                 MP_WritePhyUshort(sc, 0x15, 0x0263);
12538                 MP_WritePhyUshort(sc, 0x19, 0x0048);
12539                 MP_WritePhyUshort(sc, 0x15, 0x0264);
12540                 MP_WritePhyUshort(sc, 0x19, 0xdb7d);
12541                 MP_WritePhyUshort(sc, 0x15, 0x0265);
12542                 MP_WritePhyUshort(sc, 0x19, 0x0002);
12543                 MP_WritePhyUshort(sc, 0x15, 0x0266);
12544                 MP_WritePhyUshort(sc, 0x19, 0xa0fa);
12545                 MP_WritePhyUshort(sc, 0x15, 0x0267);
12546                 MP_WritePhyUshort(sc, 0x19, 0x4408);
12547                 MP_WritePhyUshort(sc, 0x15, 0x0268);
12548                 MP_WritePhyUshort(sc, 0x19, 0x3248);
12549                 MP_WritePhyUshort(sc, 0x15, 0x0269);
12550                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12551                 MP_WritePhyUshort(sc, 0x15, 0x026a);
12552                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12553                 MP_WritePhyUshort(sc, 0x15, 0x026b);
12554                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12555                 MP_WritePhyUshort(sc, 0x15, 0x026c);
12556                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12557                 MP_WritePhyUshort(sc, 0x15, 0x026d);
12558                 MP_WritePhyUshort(sc, 0x19, 0xb806);
12559                 MP_WritePhyUshort(sc, 0x15, 0x026e);
12560                 MP_WritePhyUshort(sc, 0x19, 0x588d);
12561                 MP_WritePhyUshort(sc, 0x15, 0x026f);
12562                 MP_WritePhyUshort(sc, 0x19, 0x5500);
12563                 MP_WritePhyUshort(sc, 0x15, 0x0270);
12564                 MP_WritePhyUshort(sc, 0x19, 0x7801);
12565                 MP_WritePhyUshort(sc, 0x15, 0x0271);
12566                 MP_WritePhyUshort(sc, 0x19, 0x4002);
12567                 MP_WritePhyUshort(sc, 0x15, 0x0272);
12568                 MP_WritePhyUshort(sc, 0x19, 0x7800);
12569                 MP_WritePhyUshort(sc, 0x15, 0x0273);
12570                 MP_WritePhyUshort(sc, 0x19, 0x4814);
12571                 MP_WritePhyUshort(sc, 0x15, 0x0274);
12572                 MP_WritePhyUshort(sc, 0x19, 0x500b);
12573                 MP_WritePhyUshort(sc, 0x15, 0x0275);
12574                 MP_WritePhyUshort(sc, 0x19, 0x4804);
12575                 MP_WritePhyUshort(sc, 0x15, 0x0276);
12576                 MP_WritePhyUshort(sc, 0x19, 0x40c4);
12577                 MP_WritePhyUshort(sc, 0x15, 0x0277);
12578                 MP_WritePhyUshort(sc, 0x19, 0x4425);
12579                 MP_WritePhyUshort(sc, 0x15, 0x0278);
12580                 MP_WritePhyUshort(sc, 0x19, 0x6a00);
12581                 MP_WritePhyUshort(sc, 0x15, 0x0279);
12582                 MP_WritePhyUshort(sc, 0x19, 0x31f5);
12583                 MP_WritePhyUshort(sc, 0x15, 0x027a);
12584                 MP_WritePhyUshort(sc, 0x19, 0xb632);
12585                 MP_WritePhyUshort(sc, 0x15, 0x027b);
12586                 MP_WritePhyUshort(sc, 0x19, 0xdc03);
12587                 MP_WritePhyUshort(sc, 0x15, 0x027c);
12588                 MP_WritePhyUshort(sc, 0x19, 0x0027);
12589                 MP_WritePhyUshort(sc, 0x15, 0x027d);
12590                 MP_WritePhyUshort(sc, 0x19, 0x80fc);
12591                 MP_WritePhyUshort(sc, 0x15, 0x027e);
12592                 MP_WritePhyUshort(sc, 0x19, 0x3283);
12593                 MP_WritePhyUshort(sc, 0x15, 0x027f);
12594                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12595                 MP_WritePhyUshort(sc, 0x15, 0x0280);
12596                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12597                 MP_WritePhyUshort(sc, 0x15, 0x0281);
12598                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12599                 MP_WritePhyUshort(sc, 0x15, 0x0282);
12600                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12601                 MP_WritePhyUshort(sc, 0x15, 0x0283);
12602                 MP_WritePhyUshort(sc, 0x19, 0xb806);
12603                 MP_WritePhyUshort(sc, 0x15, 0x0284);
12604                 MP_WritePhyUshort(sc, 0x19, 0x588f);
12605                 MP_WritePhyUshort(sc, 0x15, 0x0285);
12606                 MP_WritePhyUshort(sc, 0x19, 0x5520);
12607                 MP_WritePhyUshort(sc, 0x15, 0x0286);
12608                 MP_WritePhyUshort(sc, 0x19, 0x7801);
12609                 MP_WritePhyUshort(sc, 0x15, 0x0287);
12610                 MP_WritePhyUshort(sc, 0x19, 0x4000);
12611                 MP_WritePhyUshort(sc, 0x15, 0x0288);
12612                 MP_WritePhyUshort(sc, 0x19, 0x7800);
12613                 MP_WritePhyUshort(sc, 0x15, 0x0289);
12614                 MP_WritePhyUshort(sc, 0x19, 0x4818);
12615                 MP_WritePhyUshort(sc, 0x15, 0x028a);
12616                 MP_WritePhyUshort(sc, 0x19, 0x5051);
12617                 MP_WritePhyUshort(sc, 0x15, 0x028b);
12618                 MP_WritePhyUshort(sc, 0x19, 0x4808);
12619                 MP_WritePhyUshort(sc, 0x15, 0x028c);
12620                 MP_WritePhyUshort(sc, 0x19, 0x4050);
12621                 MP_WritePhyUshort(sc, 0x15, 0x028d);
12622                 MP_WritePhyUshort(sc, 0x19, 0x4462);
12623                 MP_WritePhyUshort(sc, 0x15, 0x028e);
12624                 MP_WritePhyUshort(sc, 0x19, 0x40c4);
12625                 MP_WritePhyUshort(sc, 0x15, 0x028f);
12626                 MP_WritePhyUshort(sc, 0x19, 0x4473);
12627                 MP_WritePhyUshort(sc, 0x15, 0x0290);
12628                 MP_WritePhyUshort(sc, 0x19, 0x5041);
12629                 MP_WritePhyUshort(sc, 0x15, 0x0291);
12630                 MP_WritePhyUshort(sc, 0x19, 0x6b00);
12631                 MP_WritePhyUshort(sc, 0x15, 0x0292);
12632                 MP_WritePhyUshort(sc, 0x19, 0x31f5);
12633                 MP_WritePhyUshort(sc, 0x15, 0x0293);
12634                 MP_WritePhyUshort(sc, 0x19, 0xb619);
12635                 MP_WritePhyUshort(sc, 0x15, 0x0294);
12636                 MP_WritePhyUshort(sc, 0x19, 0x80d9);
12637                 MP_WritePhyUshort(sc, 0x15, 0x0295);
12638                 MP_WritePhyUshort(sc, 0x19, 0xbd06);
12639                 MP_WritePhyUshort(sc, 0x15, 0x0296);
12640                 MP_WritePhyUshort(sc, 0x19, 0xbb0d);
12641                 MP_WritePhyUshort(sc, 0x15, 0x0297);
12642                 MP_WritePhyUshort(sc, 0x19, 0xaf14);
12643                 MP_WritePhyUshort(sc, 0x15, 0x0298);
12644                 MP_WritePhyUshort(sc, 0x19, 0x8efa);
12645                 MP_WritePhyUshort(sc, 0x15, 0x0299);
12646                 MP_WritePhyUshort(sc, 0x19, 0x5049);
12647                 MP_WritePhyUshort(sc, 0x15, 0x029a);
12648                 MP_WritePhyUshort(sc, 0x19, 0x3248);
12649                 MP_WritePhyUshort(sc, 0x15, 0x029b);
12650                 MP_WritePhyUshort(sc, 0x19, 0x4c10);
12651                 MP_WritePhyUshort(sc, 0x15, 0x029c);
12652                 MP_WritePhyUshort(sc, 0x19, 0x44b0);
12653                 MP_WritePhyUshort(sc, 0x15, 0x029d);
12654                 MP_WritePhyUshort(sc, 0x19, 0x4c00);
12655                 MP_WritePhyUshort(sc, 0x15, 0x029e);
12656                 MP_WritePhyUshort(sc, 0x19, 0x3292);
12657                 MP_WritePhyUshort(sc, 0x15, 0x029f);
12658                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12659                 MP_WritePhyUshort(sc, 0x15, 0x02a0);
12660                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12661                 MP_WritePhyUshort(sc, 0x15, 0x02a1);
12662                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12663                 MP_WritePhyUshort(sc, 0x15, 0x02a2);
12664                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12665                 MP_WritePhyUshort(sc, 0x15, 0x02a3);
12666                 MP_WritePhyUshort(sc, 0x19, 0x481f);
12667                 MP_WritePhyUshort(sc, 0x15, 0x02a4);
12668                 MP_WritePhyUshort(sc, 0x19, 0x5005);
12669                 MP_WritePhyUshort(sc, 0x15, 0x02a5);
12670                 MP_WritePhyUshort(sc, 0x19, 0x480f);
12671                 MP_WritePhyUshort(sc, 0x15, 0x02a6);
12672                 MP_WritePhyUshort(sc, 0x19, 0xac00);
12673                 MP_WritePhyUshort(sc, 0x15, 0x02a7);
12674                 MP_WritePhyUshort(sc, 0x19, 0x31a6);
12675                 MP_WritePhyUshort(sc, 0x15, 0x02a8);
12676                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12677                 MP_WritePhyUshort(sc, 0x15, 0x02a9);
12678                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12679                 MP_WritePhyUshort(sc, 0x15, 0x02aa);
12680                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12681                 MP_WritePhyUshort(sc, 0x15, 0x02ab);
12682                 MP_WritePhyUshort(sc, 0x19, 0x31ba);
12683                 MP_WritePhyUshort(sc, 0x15, 0x02ac);
12684                 MP_WritePhyUshort(sc, 0x19, 0x31d5);
12685                 MP_WritePhyUshort(sc, 0x15, 0x02ad);
12686                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12687                 MP_WritePhyUshort(sc, 0x15, 0x02ae);
12688                 MP_WritePhyUshort(sc, 0x19, 0x5cf0);
12689                 MP_WritePhyUshort(sc, 0x15, 0x02af);
12690                 MP_WritePhyUshort(sc, 0x19, 0x588c);
12691                 MP_WritePhyUshort(sc, 0x15, 0x02b0);
12692                 MP_WritePhyUshort(sc, 0x19, 0x542f);
12693                 MP_WritePhyUshort(sc, 0x15, 0x02b1);
12694                 MP_WritePhyUshort(sc, 0x19, 0x7ffb);
12695                 MP_WritePhyUshort(sc, 0x15, 0x02b2);
12696                 MP_WritePhyUshort(sc, 0x19, 0x6ff8);
12697                 MP_WritePhyUshort(sc, 0x15, 0x02b3);
12698                 MP_WritePhyUshort(sc, 0x19, 0x64a4);
12699                 MP_WritePhyUshort(sc, 0x15, 0x02b4);
12700                 MP_WritePhyUshort(sc, 0x19, 0x64a0);
12701                 MP_WritePhyUshort(sc, 0x15, 0x02b5);
12702                 MP_WritePhyUshort(sc, 0x19, 0x6800);
12703                 MP_WritePhyUshort(sc, 0x15, 0x02b6);
12704                 MP_WritePhyUshort(sc, 0x19, 0x4400);
12705                 MP_WritePhyUshort(sc, 0x15, 0x02b7);
12706                 MP_WritePhyUshort(sc, 0x19, 0x4020);
12707                 MP_WritePhyUshort(sc, 0x15, 0x02b8);
12708                 MP_WritePhyUshort(sc, 0x19, 0x4480);
12709                 MP_WritePhyUshort(sc, 0x15, 0x02b9);
12710                 MP_WritePhyUshort(sc, 0x19, 0x9e00);
12711                 MP_WritePhyUshort(sc, 0x15, 0x02ba);
12712                 MP_WritePhyUshort(sc, 0x19, 0x4891);
12713                 MP_WritePhyUshort(sc, 0x15, 0x02bb);
12714                 MP_WritePhyUshort(sc, 0x19, 0x4cc0);
12715                 MP_WritePhyUshort(sc, 0x15, 0x02bc);
12716                 MP_WritePhyUshort(sc, 0x19, 0x4801);
12717                 MP_WritePhyUshort(sc, 0x15, 0x02bd);
12718                 MP_WritePhyUshort(sc, 0x19, 0xa609);
12719                 MP_WritePhyUshort(sc, 0x15, 0x02be);
12720                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
12721                 MP_WritePhyUshort(sc, 0x15, 0x02bf);
12722                 MP_WritePhyUshort(sc, 0x19, 0x004e);
12723                 MP_WritePhyUshort(sc, 0x15, 0x02c0);
12724                 MP_WritePhyUshort(sc, 0x19, 0x87fe);
12725                 MP_WritePhyUshort(sc, 0x15, 0x02c1);
12726                 MP_WritePhyUshort(sc, 0x19, 0x32c6);
12727                 MP_WritePhyUshort(sc, 0x15, 0x02c2);
12728                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12729                 MP_WritePhyUshort(sc, 0x15, 0x02c3);
12730                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12731                 MP_WritePhyUshort(sc, 0x15, 0x02c4);
12732                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12733                 MP_WritePhyUshort(sc, 0x15, 0x02c5);
12734                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12735                 MP_WritePhyUshort(sc, 0x15, 0x02c6);
12736                 MP_WritePhyUshort(sc, 0x19, 0x48b2);
12737                 MP_WritePhyUshort(sc, 0x15, 0x02c7);
12738                 MP_WritePhyUshort(sc, 0x19, 0x4020);
12739                 MP_WritePhyUshort(sc, 0x15, 0x02c8);
12740                 MP_WritePhyUshort(sc, 0x19, 0x4822);
12741                 MP_WritePhyUshort(sc, 0x15, 0x02c9);
12742                 MP_WritePhyUshort(sc, 0x19, 0x4488);
12743                 MP_WritePhyUshort(sc, 0x15, 0x02ca);
12744                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
12745                 MP_WritePhyUshort(sc, 0x15, 0x02cb);
12746                 MP_WritePhyUshort(sc, 0x19, 0x0042);
12747                 MP_WritePhyUshort(sc, 0x15, 0x02cc);
12748                 MP_WritePhyUshort(sc, 0x19, 0x8203);
12749                 MP_WritePhyUshort(sc, 0x15, 0x02cd);
12750                 MP_WritePhyUshort(sc, 0x19, 0x4cc8);
12751                 MP_WritePhyUshort(sc, 0x15, 0x02ce);
12752                 MP_WritePhyUshort(sc, 0x19, 0x32d0);
12753                 MP_WritePhyUshort(sc, 0x15, 0x02cf);
12754                 MP_WritePhyUshort(sc, 0x19, 0x4cc0);
12755                 MP_WritePhyUshort(sc, 0x15, 0x02d0);
12756                 MP_WritePhyUshort(sc, 0x19, 0xc4d4);
12757                 MP_WritePhyUshort(sc, 0x15, 0x02d1);
12758                 MP_WritePhyUshort(sc, 0x19, 0x00f9);
12759                 MP_WritePhyUshort(sc, 0x15, 0x02d2);
12760                 MP_WritePhyUshort(sc, 0x19, 0xa51a);
12761                 MP_WritePhyUshort(sc, 0x15, 0x02d3);
12762                 MP_WritePhyUshort(sc, 0x19, 0x32d9);
12763                 MP_WritePhyUshort(sc, 0x15, 0x02d4);
12764                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12765                 MP_WritePhyUshort(sc, 0x15, 0x02d5);
12766                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12767                 MP_WritePhyUshort(sc, 0x15, 0x02d6);
12768                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12769                 MP_WritePhyUshort(sc, 0x15, 0x02d7);
12770                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12771                 MP_WritePhyUshort(sc, 0x15, 0x02d8);
12772                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12773                 MP_WritePhyUshort(sc, 0x15, 0x02d9);
12774                 MP_WritePhyUshort(sc, 0x19, 0x48b3);
12775                 MP_WritePhyUshort(sc, 0x15, 0x02da);
12776                 MP_WritePhyUshort(sc, 0x19, 0x4020);
12777                 MP_WritePhyUshort(sc, 0x15, 0x02db);
12778                 MP_WritePhyUshort(sc, 0x19, 0x4823);
12779                 MP_WritePhyUshort(sc, 0x15, 0x02dc);
12780                 MP_WritePhyUshort(sc, 0x19, 0x4410);
12781                 MP_WritePhyUshort(sc, 0x15, 0x02dd);
12782                 MP_WritePhyUshort(sc, 0x19, 0xb630);
12783                 MP_WritePhyUshort(sc, 0x15, 0x02de);
12784                 MP_WritePhyUshort(sc, 0x19, 0x7dc8);
12785                 MP_WritePhyUshort(sc, 0x15, 0x02df);
12786                 MP_WritePhyUshort(sc, 0x19, 0x8203);
12787                 MP_WritePhyUshort(sc, 0x15, 0x02e0);
12788                 MP_WritePhyUshort(sc, 0x19, 0x4c48);
12789                 MP_WritePhyUshort(sc, 0x15, 0x02e1);
12790                 MP_WritePhyUshort(sc, 0x19, 0x32e3);
12791                 MP_WritePhyUshort(sc, 0x15, 0x02e2);
12792                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
12793                 MP_WritePhyUshort(sc, 0x15, 0x02e3);
12794                 MP_WritePhyUshort(sc, 0x19, 0x9bfa);
12795                 MP_WritePhyUshort(sc, 0x15, 0x02e4);
12796                 MP_WritePhyUshort(sc, 0x19, 0x84ca);
12797                 MP_WritePhyUshort(sc, 0x15, 0x02e5);
12798                 MP_WritePhyUshort(sc, 0x19, 0x85f8);
12799                 MP_WritePhyUshort(sc, 0x15, 0x02e6);
12800                 MP_WritePhyUshort(sc, 0x19, 0x32ec);
12801                 MP_WritePhyUshort(sc, 0x15, 0x02e7);
12802                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12803                 MP_WritePhyUshort(sc, 0x15, 0x02e8);
12804                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12805                 MP_WritePhyUshort(sc, 0x15, 0x02e9);
12806                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12807                 MP_WritePhyUshort(sc, 0x15, 0x02ea);
12808                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12809                 MP_WritePhyUshort(sc, 0x15, 0x02eb);
12810                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12811                 MP_WritePhyUshort(sc, 0x15, 0x02ec);
12812                 MP_WritePhyUshort(sc, 0x19, 0x48d4);
12813                 MP_WritePhyUshort(sc, 0x15, 0x02ed);
12814                 MP_WritePhyUshort(sc, 0x19, 0x4020);
12815                 MP_WritePhyUshort(sc, 0x15, 0x02ee);
12816                 MP_WritePhyUshort(sc, 0x19, 0x4844);
12817                 MP_WritePhyUshort(sc, 0x15, 0x02ef);
12818                 MP_WritePhyUshort(sc, 0x19, 0x4420);
12819                 MP_WritePhyUshort(sc, 0x15, 0x02f0);
12820                 MP_WritePhyUshort(sc, 0x19, 0x6800);
12821                 MP_WritePhyUshort(sc, 0x15, 0x02f1);
12822                 MP_WritePhyUshort(sc, 0x19, 0x7dc0);
12823                 MP_WritePhyUshort(sc, 0x15, 0x02f2);
12824                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
12825                 MP_WritePhyUshort(sc, 0x15, 0x02f3);
12826                 MP_WritePhyUshort(sc, 0x19, 0x7c0b);
12827                 MP_WritePhyUshort(sc, 0x15, 0x02f4);
12828                 MP_WritePhyUshort(sc, 0x19, 0x6c08);
12829                 MP_WritePhyUshort(sc, 0x15, 0x02f5);
12830                 MP_WritePhyUshort(sc, 0x19, 0x3311);
12831                 MP_WritePhyUshort(sc, 0x15, 0x02f6);
12832                 MP_WritePhyUshort(sc, 0x19, 0x9cfd);
12833                 MP_WritePhyUshort(sc, 0x15, 0x02f7);
12834                 MP_WritePhyUshort(sc, 0x19, 0xb616);
12835                 MP_WritePhyUshort(sc, 0x15, 0x02f8);
12836                 MP_WritePhyUshort(sc, 0x19, 0xc42b);
12837                 MP_WritePhyUshort(sc, 0x15, 0x02f9);
12838                 MP_WritePhyUshort(sc, 0x19, 0x00e0);
12839                 MP_WritePhyUshort(sc, 0x15, 0x02fa);
12840                 MP_WritePhyUshort(sc, 0x19, 0xc455);
12841                 MP_WritePhyUshort(sc, 0x15, 0x02fb);
12842                 MP_WritePhyUshort(sc, 0x19, 0x00b3);
12843                 MP_WritePhyUshort(sc, 0x15, 0x02fc);
12844                 MP_WritePhyUshort(sc, 0x19, 0xb20a);
12845                 MP_WritePhyUshort(sc, 0x15, 0x02fd);
12846                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
12847                 MP_WritePhyUshort(sc, 0x15, 0x02fe);
12848                 MP_WritePhyUshort(sc, 0x19, 0x6c02);
12849                 MP_WritePhyUshort(sc, 0x15, 0x02ff);
12850                 MP_WritePhyUshort(sc, 0x19, 0x8204);
12851                 MP_WritePhyUshort(sc, 0x15, 0x0300);
12852                 MP_WritePhyUshort(sc, 0x19, 0x7c04);
12853                 MP_WritePhyUshort(sc, 0x15, 0x0301);
12854                 MP_WritePhyUshort(sc, 0x19, 0x7404);
12855                 MP_WritePhyUshort(sc, 0x15, 0x0302);
12856                 MP_WritePhyUshort(sc, 0x19, 0x32f3);
12857                 MP_WritePhyUshort(sc, 0x15, 0x0303);
12858                 MP_WritePhyUshort(sc, 0x19, 0x7c04);
12859                 MP_WritePhyUshort(sc, 0x15, 0x0304);
12860                 MP_WritePhyUshort(sc, 0x19, 0x7400);
12861                 MP_WritePhyUshort(sc, 0x15, 0x0305);
12862                 MP_WritePhyUshort(sc, 0x19, 0x32f3);
12863                 MP_WritePhyUshort(sc, 0x15, 0x0306);
12864                 MP_WritePhyUshort(sc, 0x19, 0xefed);
12865                 MP_WritePhyUshort(sc, 0x15, 0x0307);
12866                 MP_WritePhyUshort(sc, 0x19, 0x3342);
12867                 MP_WritePhyUshort(sc, 0x15, 0x0308);
12868                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12869                 MP_WritePhyUshort(sc, 0x15, 0x0309);
12870                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12871                 MP_WritePhyUshort(sc, 0x15, 0x030a);
12872                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12873                 MP_WritePhyUshort(sc, 0x15, 0x030b);
12874                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12875                 MP_WritePhyUshort(sc, 0x15, 0x030c);
12876                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12877                 MP_WritePhyUshort(sc, 0x15, 0x030d);
12878                 MP_WritePhyUshort(sc, 0x19, 0x3006);
12879                 MP_WritePhyUshort(sc, 0x15, 0x030e);
12880                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12881                 MP_WritePhyUshort(sc, 0x15, 0x030f);
12882                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12883                 MP_WritePhyUshort(sc, 0x15, 0x0310);
12884                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12885                 MP_WritePhyUshort(sc, 0x15, 0x0311);
12886                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
12887                 MP_WritePhyUshort(sc, 0x15, 0x0312);
12888                 MP_WritePhyUshort(sc, 0x19, 0xa207);
12889                 MP_WritePhyUshort(sc, 0x15, 0x0313);
12890                 MP_WritePhyUshort(sc, 0x19, 0x4c00);
12891                 MP_WritePhyUshort(sc, 0x15, 0x0314);
12892                 MP_WritePhyUshort(sc, 0x19, 0x3322);
12893                 MP_WritePhyUshort(sc, 0x15, 0x0315);
12894                 MP_WritePhyUshort(sc, 0x19, 0x4041);
12895                 MP_WritePhyUshort(sc, 0x15, 0x0316);
12896                 MP_WritePhyUshort(sc, 0x19, 0x7d07);
12897                 MP_WritePhyUshort(sc, 0x15, 0x0317);
12898                 MP_WritePhyUshort(sc, 0x19, 0x4502);
12899                 MP_WritePhyUshort(sc, 0x15, 0x0318);
12900                 MP_WritePhyUshort(sc, 0x19, 0x3322);
12901                 MP_WritePhyUshort(sc, 0x15, 0x0319);
12902                 MP_WritePhyUshort(sc, 0x19, 0x4c08);
12903                 MP_WritePhyUshort(sc, 0x15, 0x031a);
12904                 MP_WritePhyUshort(sc, 0x19, 0x3322);
12905                 MP_WritePhyUshort(sc, 0x15, 0x031b);
12906                 MP_WritePhyUshort(sc, 0x19, 0x7d80);
12907                 MP_WritePhyUshort(sc, 0x15, 0x031c);
12908                 MP_WritePhyUshort(sc, 0x19, 0x5180);
12909                 MP_WritePhyUshort(sc, 0x15, 0x031d);
12910                 MP_WritePhyUshort(sc, 0x19, 0x3320);
12911                 MP_WritePhyUshort(sc, 0x15, 0x031e);
12912                 MP_WritePhyUshort(sc, 0x19, 0x7d80);
12913                 MP_WritePhyUshort(sc, 0x15, 0x031f);
12914                 MP_WritePhyUshort(sc, 0x19, 0x5000);
12915                 MP_WritePhyUshort(sc, 0x15, 0x0320);
12916                 MP_WritePhyUshort(sc, 0x19, 0x7d07);
12917                 MP_WritePhyUshort(sc, 0x15, 0x0321);
12918                 MP_WritePhyUshort(sc, 0x19, 0x4402);
12919                 MP_WritePhyUshort(sc, 0x15, 0x0322);
12920                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
12921                 MP_WritePhyUshort(sc, 0x15, 0x0323);
12922                 MP_WritePhyUshort(sc, 0x19, 0x6c02);
12923                 MP_WritePhyUshort(sc, 0x15, 0x0324);
12924                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
12925                 MP_WritePhyUshort(sc, 0x15, 0x0325);
12926                 MP_WritePhyUshort(sc, 0x19, 0xb30c);
12927                 MP_WritePhyUshort(sc, 0x15, 0x0326);
12928                 MP_WritePhyUshort(sc, 0x19, 0xb206);
12929                 MP_WritePhyUshort(sc, 0x15, 0x0327);
12930                 MP_WritePhyUshort(sc, 0x19, 0xb103);
12931                 MP_WritePhyUshort(sc, 0x15, 0x0328);
12932                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12933                 MP_WritePhyUshort(sc, 0x15, 0x0329);
12934                 MP_WritePhyUshort(sc, 0x19, 0x32f6);
12935                 MP_WritePhyUshort(sc, 0x15, 0x032a);
12936                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12937                 MP_WritePhyUshort(sc, 0x15, 0x032b);
12938                 MP_WritePhyUshort(sc, 0x19, 0x3352);
12939                 MP_WritePhyUshort(sc, 0x15, 0x032c);
12940                 MP_WritePhyUshort(sc, 0x19, 0xb103);
12941                 MP_WritePhyUshort(sc, 0x15, 0x032d);
12942                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12943                 MP_WritePhyUshort(sc, 0x15, 0x032e);
12944                 MP_WritePhyUshort(sc, 0x19, 0x336a);
12945                 MP_WritePhyUshort(sc, 0x15, 0x032f);
12946                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12947                 MP_WritePhyUshort(sc, 0x15, 0x0330);
12948                 MP_WritePhyUshort(sc, 0x19, 0x3382);
12949                 MP_WritePhyUshort(sc, 0x15, 0x0331);
12950                 MP_WritePhyUshort(sc, 0x19, 0xb206);
12951                 MP_WritePhyUshort(sc, 0x15, 0x0332);
12952                 MP_WritePhyUshort(sc, 0x19, 0xb103);
12953                 MP_WritePhyUshort(sc, 0x15, 0x0333);
12954                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12955                 MP_WritePhyUshort(sc, 0x15, 0x0334);
12956                 MP_WritePhyUshort(sc, 0x19, 0x3395);
12957                 MP_WritePhyUshort(sc, 0x15, 0x0335);
12958                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12959                 MP_WritePhyUshort(sc, 0x15, 0x0336);
12960                 MP_WritePhyUshort(sc, 0x19, 0x33c6);
12961                 MP_WritePhyUshort(sc, 0x15, 0x0337);
12962                 MP_WritePhyUshort(sc, 0x19, 0xb103);
12963                 MP_WritePhyUshort(sc, 0x15, 0x0338);
12964                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12965                 MP_WritePhyUshort(sc, 0x15, 0x0339);
12966                 MP_WritePhyUshort(sc, 0x19, 0x33d7);
12967                 MP_WritePhyUshort(sc, 0x15, 0x033a);
12968                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
12969                 MP_WritePhyUshort(sc, 0x15, 0x033b);
12970                 MP_WritePhyUshort(sc, 0x19, 0x33f2);
12971                 MP_WritePhyUshort(sc, 0x15, 0x033c);
12972                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12973                 MP_WritePhyUshort(sc, 0x15, 0x033d);
12974                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12975                 MP_WritePhyUshort(sc, 0x15, 0x033e);
12976                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12977                 MP_WritePhyUshort(sc, 0x15, 0x033f);
12978                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12979                 MP_WritePhyUshort(sc, 0x15, 0x0340);
12980                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12981                 MP_WritePhyUshort(sc, 0x15, 0x0341);
12982                 MP_WritePhyUshort(sc, 0x19, 0x0000);
12983                 MP_WritePhyUshort(sc, 0x15, 0x0342);
12984                 MP_WritePhyUshort(sc, 0x19, 0x49b5);
12985                 MP_WritePhyUshort(sc, 0x15, 0x0343);
12986                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
12987                 MP_WritePhyUshort(sc, 0x15, 0x0344);
12988                 MP_WritePhyUshort(sc, 0x19, 0x4d00);
12989                 MP_WritePhyUshort(sc, 0x15, 0x0345);
12990                 MP_WritePhyUshort(sc, 0x19, 0x6880);
12991                 MP_WritePhyUshort(sc, 0x15, 0x0346);
12992                 MP_WritePhyUshort(sc, 0x19, 0x7c08);
12993                 MP_WritePhyUshort(sc, 0x15, 0x0347);
12994                 MP_WritePhyUshort(sc, 0x19, 0x6c08);
12995                 MP_WritePhyUshort(sc, 0x15, 0x0348);
12996                 MP_WritePhyUshort(sc, 0x19, 0x4925);
12997                 MP_WritePhyUshort(sc, 0x15, 0x0349);
12998                 MP_WritePhyUshort(sc, 0x19, 0x403b);
12999                 MP_WritePhyUshort(sc, 0x15, 0x034a);
13000                 MP_WritePhyUshort(sc, 0x19, 0xa602);
13001                 MP_WritePhyUshort(sc, 0x15, 0x034b);
13002                 MP_WritePhyUshort(sc, 0x19, 0x402f);
13003                 MP_WritePhyUshort(sc, 0x15, 0x034c);
13004                 MP_WritePhyUshort(sc, 0x19, 0x4484);
13005                 MP_WritePhyUshort(sc, 0x15, 0x034d);
13006                 MP_WritePhyUshort(sc, 0x19, 0x40c8);
13007                 MP_WritePhyUshort(sc, 0x15, 0x034e);
13008                 MP_WritePhyUshort(sc, 0x19, 0x44c4);
13009                 MP_WritePhyUshort(sc, 0x15, 0x034f);
13010                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
13011                 MP_WritePhyUshort(sc, 0x15, 0x0350);
13012                 MP_WritePhyUshort(sc, 0x19, 0x00bd);
13013                 MP_WritePhyUshort(sc, 0x15, 0x0351);
13014                 MP_WritePhyUshort(sc, 0x19, 0x3311);
13015                 MP_WritePhyUshort(sc, 0x15, 0x0352);
13016                 MP_WritePhyUshort(sc, 0x19, 0xc8ed);
13017                 MP_WritePhyUshort(sc, 0x15, 0x0353);
13018                 MP_WritePhyUshort(sc, 0x19, 0x00fc);
13019                 MP_WritePhyUshort(sc, 0x15, 0x0354);
13020                 MP_WritePhyUshort(sc, 0x19, 0x8221);
13021                 MP_WritePhyUshort(sc, 0x15, 0x0355);
13022                 MP_WritePhyUshort(sc, 0x19, 0xd11d);
13023                 MP_WritePhyUshort(sc, 0x15, 0x0356);
13024                 MP_WritePhyUshort(sc, 0x19, 0x001f);
13025                 MP_WritePhyUshort(sc, 0x15, 0x0357);
13026                 MP_WritePhyUshort(sc, 0x19, 0xde18);
13027                 MP_WritePhyUshort(sc, 0x15, 0x0358);
13028                 MP_WritePhyUshort(sc, 0x19, 0x0008);
13029                 MP_WritePhyUshort(sc, 0x15, 0x0359);
13030                 MP_WritePhyUshort(sc, 0x19, 0x91f6);
13031                 MP_WritePhyUshort(sc, 0x15, 0x035a);
13032                 MP_WritePhyUshort(sc, 0x19, 0x3360);
13033                 MP_WritePhyUshort(sc, 0x15, 0x035b);
13034                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13035                 MP_WritePhyUshort(sc, 0x15, 0x035c);
13036                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13037                 MP_WritePhyUshort(sc, 0x15, 0x035d);
13038                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13039                 MP_WritePhyUshort(sc, 0x15, 0x035e);
13040                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13041                 MP_WritePhyUshort(sc, 0x15, 0x035f);
13042                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13043                 MP_WritePhyUshort(sc, 0x15, 0x0360);
13044                 MP_WritePhyUshort(sc, 0x19, 0x4bb6);
13045                 MP_WritePhyUshort(sc, 0x15, 0x0361);
13046                 MP_WritePhyUshort(sc, 0x19, 0x4064);
13047                 MP_WritePhyUshort(sc, 0x15, 0x0362);
13048                 MP_WritePhyUshort(sc, 0x19, 0x4b26);
13049                 MP_WritePhyUshort(sc, 0x15, 0x0363);
13050                 MP_WritePhyUshort(sc, 0x19, 0x4410);
13051                 MP_WritePhyUshort(sc, 0x15, 0x0364);
13052                 MP_WritePhyUshort(sc, 0x19, 0x4006);
13053                 MP_WritePhyUshort(sc, 0x15, 0x0365);
13054                 MP_WritePhyUshort(sc, 0x19, 0x4490);
13055                 MP_WritePhyUshort(sc, 0x15, 0x0366);
13056                 MP_WritePhyUshort(sc, 0x19, 0x6900);
13057                 MP_WritePhyUshort(sc, 0x15, 0x0367);
13058                 MP_WritePhyUshort(sc, 0x19, 0xb6a6);
13059                 MP_WritePhyUshort(sc, 0x15, 0x0368);
13060                 MP_WritePhyUshort(sc, 0x19, 0x9e02);
13061                 MP_WritePhyUshort(sc, 0x15, 0x0369);
13062                 MP_WritePhyUshort(sc, 0x19, 0x3311);
13063                 MP_WritePhyUshort(sc, 0x15, 0x036a);
13064                 MP_WritePhyUshort(sc, 0x19, 0xd11d);
13065                 MP_WritePhyUshort(sc, 0x15, 0x036b);
13066                 MP_WritePhyUshort(sc, 0x19, 0x000a);
13067                 MP_WritePhyUshort(sc, 0x15, 0x036c);
13068                 MP_WritePhyUshort(sc, 0x19, 0xbb0f);
13069                 MP_WritePhyUshort(sc, 0x15, 0x036d);
13070                 MP_WritePhyUshort(sc, 0x19, 0x8102);
13071                 MP_WritePhyUshort(sc, 0x15, 0x036e);
13072                 MP_WritePhyUshort(sc, 0x19, 0x3371);
13073                 MP_WritePhyUshort(sc, 0x15, 0x036f);
13074                 MP_WritePhyUshort(sc, 0x19, 0xa21e);
13075                 MP_WritePhyUshort(sc, 0x15, 0x0370);
13076                 MP_WritePhyUshort(sc, 0x19, 0x33b6);
13077                 MP_WritePhyUshort(sc, 0x15, 0x0371);
13078                 MP_WritePhyUshort(sc, 0x19, 0x91f6);
13079                 MP_WritePhyUshort(sc, 0x15, 0x0372);
13080                 MP_WritePhyUshort(sc, 0x19, 0xc218);
13081                 MP_WritePhyUshort(sc, 0x15, 0x0373);
13082                 MP_WritePhyUshort(sc, 0x19, 0x00f4);
13083                 MP_WritePhyUshort(sc, 0x15, 0x0374);
13084                 MP_WritePhyUshort(sc, 0x19, 0x33b6);
13085                 MP_WritePhyUshort(sc, 0x15, 0x0375);
13086                 MP_WritePhyUshort(sc, 0x19, 0x32ec);
13087                 MP_WritePhyUshort(sc, 0x15, 0x0376);
13088                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13089                 MP_WritePhyUshort(sc, 0x15, 0x0377);
13090                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13091                 MP_WritePhyUshort(sc, 0x15, 0x0378);
13092                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13093                 MP_WritePhyUshort(sc, 0x15, 0x0379);
13094                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13095                 MP_WritePhyUshort(sc, 0x15, 0x037a);
13096                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13097                 MP_WritePhyUshort(sc, 0x15, 0x037b);
13098                 MP_WritePhyUshort(sc, 0x19, 0x4b97);
13099                 MP_WritePhyUshort(sc, 0x15, 0x037c);
13100                 MP_WritePhyUshort(sc, 0x19, 0x402b);
13101                 MP_WritePhyUshort(sc, 0x15, 0x037d);
13102                 MP_WritePhyUshort(sc, 0x19, 0x4b07);
13103                 MP_WritePhyUshort(sc, 0x15, 0x037e);
13104                 MP_WritePhyUshort(sc, 0x19, 0x4422);
13105                 MP_WritePhyUshort(sc, 0x15, 0x037f);
13106                 MP_WritePhyUshort(sc, 0x19, 0x6980);
13107                 MP_WritePhyUshort(sc, 0x15, 0x0380);
13108                 MP_WritePhyUshort(sc, 0x19, 0xb608);
13109                 MP_WritePhyUshort(sc, 0x15, 0x0381);
13110                 MP_WritePhyUshort(sc, 0x19, 0x3311);
13111                 MP_WritePhyUshort(sc, 0x15, 0x0382);
13112                 MP_WritePhyUshort(sc, 0x19, 0xbc05);
13113                 MP_WritePhyUshort(sc, 0x15, 0x0383);
13114                 MP_WritePhyUshort(sc, 0x19, 0xc21c);
13115                 MP_WritePhyUshort(sc, 0x15, 0x0384);
13116                 MP_WritePhyUshort(sc, 0x19, 0x0032);
13117                 MP_WritePhyUshort(sc, 0x15, 0x0385);
13118                 MP_WritePhyUshort(sc, 0x19, 0xa1fb);
13119                 MP_WritePhyUshort(sc, 0x15, 0x0386);
13120                 MP_WritePhyUshort(sc, 0x19, 0x338d);
13121                 MP_WritePhyUshort(sc, 0x15, 0x0387);
13122                 MP_WritePhyUshort(sc, 0x19, 0x32ae);
13123                 MP_WritePhyUshort(sc, 0x15, 0x0388);
13124                 MP_WritePhyUshort(sc, 0x19, 0x330d);
13125                 MP_WritePhyUshort(sc, 0x15, 0x0389);
13126                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13127                 MP_WritePhyUshort(sc, 0x15, 0x038a);
13128                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13129                 MP_WritePhyUshort(sc, 0x15, 0x038b);
13130                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13131                 MP_WritePhyUshort(sc, 0x15, 0x038c);
13132                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13133                 MP_WritePhyUshort(sc, 0x15, 0x038d);
13134                 MP_WritePhyUshort(sc, 0x19, 0x4b97);
13135                 MP_WritePhyUshort(sc, 0x15, 0x038e);
13136                 MP_WritePhyUshort(sc, 0x19, 0x6a08);
13137                 MP_WritePhyUshort(sc, 0x15, 0x038f);
13138                 MP_WritePhyUshort(sc, 0x19, 0x4b07);
13139                 MP_WritePhyUshort(sc, 0x15, 0x0390);
13140                 MP_WritePhyUshort(sc, 0x19, 0x40ac);
13141                 MP_WritePhyUshort(sc, 0x15, 0x0391);
13142                 MP_WritePhyUshort(sc, 0x19, 0x4445);
13143                 MP_WritePhyUshort(sc, 0x15, 0x0392);
13144                 MP_WritePhyUshort(sc, 0x19, 0x404e);
13145                 MP_WritePhyUshort(sc, 0x15, 0x0393);
13146                 MP_WritePhyUshort(sc, 0x19, 0x4461);
13147                 MP_WritePhyUshort(sc, 0x15, 0x0394);
13148                 MP_WritePhyUshort(sc, 0x19, 0x3311);
13149                 MP_WritePhyUshort(sc, 0x15, 0x0395);
13150                 MP_WritePhyUshort(sc, 0x19, 0x9c0a);
13151                 MP_WritePhyUshort(sc, 0x15, 0x0396);
13152                 MP_WritePhyUshort(sc, 0x19, 0x63da);
13153                 MP_WritePhyUshort(sc, 0x15, 0x0397);
13154                 MP_WritePhyUshort(sc, 0x19, 0x6f0c);
13155                 MP_WritePhyUshort(sc, 0x15, 0x0398);
13156                 MP_WritePhyUshort(sc, 0x19, 0x5440);
13157                 MP_WritePhyUshort(sc, 0x15, 0x0399);
13158                 MP_WritePhyUshort(sc, 0x19, 0x4b98);
13159                 MP_WritePhyUshort(sc, 0x15, 0x039a);
13160                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
13161                 MP_WritePhyUshort(sc, 0x15, 0x039b);
13162                 MP_WritePhyUshort(sc, 0x19, 0x4c00);
13163                 MP_WritePhyUshort(sc, 0x15, 0x039c);
13164                 MP_WritePhyUshort(sc, 0x19, 0x4b08);
13165                 MP_WritePhyUshort(sc, 0x15, 0x039d);
13166                 MP_WritePhyUshort(sc, 0x19, 0x63d8);
13167                 MP_WritePhyUshort(sc, 0x15, 0x039e);
13168                 MP_WritePhyUshort(sc, 0x19, 0x33a5);
13169                 MP_WritePhyUshort(sc, 0x15, 0x039f);
13170                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
13171                 MP_WritePhyUshort(sc, 0x15, 0x03a0);
13172                 MP_WritePhyUshort(sc, 0x19, 0x00e8);
13173                 MP_WritePhyUshort(sc, 0x15, 0x03a1);
13174                 MP_WritePhyUshort(sc, 0x19, 0x820e);
13175                 MP_WritePhyUshort(sc, 0x15, 0x03a2);
13176                 MP_WritePhyUshort(sc, 0x19, 0xa10d);
13177                 MP_WritePhyUshort(sc, 0x15, 0x03a3);
13178                 MP_WritePhyUshort(sc, 0x19, 0x9df1);
13179                 MP_WritePhyUshort(sc, 0x15, 0x03a4);
13180                 MP_WritePhyUshort(sc, 0x19, 0x33af);
13181                 MP_WritePhyUshort(sc, 0x15, 0x03a5);
13182                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
13183                 MP_WritePhyUshort(sc, 0x15, 0x03a6);
13184                 MP_WritePhyUshort(sc, 0x19, 0x00f9);
13185                 MP_WritePhyUshort(sc, 0x15, 0x03a7);
13186                 MP_WritePhyUshort(sc, 0x19, 0xc017);
13187                 MP_WritePhyUshort(sc, 0x15, 0x03a8);
13188                 MP_WritePhyUshort(sc, 0x19, 0x0007);
13189                 MP_WritePhyUshort(sc, 0x15, 0x03a9);
13190                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
13191                 MP_WritePhyUshort(sc, 0x15, 0x03aa);
13192                 MP_WritePhyUshort(sc, 0x19, 0x6c03);
13193                 MP_WritePhyUshort(sc, 0x15, 0x03ab);
13194                 MP_WritePhyUshort(sc, 0x19, 0xa104);
13195                 MP_WritePhyUshort(sc, 0x15, 0x03ac);
13196                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
13197                 MP_WritePhyUshort(sc, 0x15, 0x03ad);
13198                 MP_WritePhyUshort(sc, 0x19, 0x6c00);
13199                 MP_WritePhyUshort(sc, 0x15, 0x03ae);
13200                 MP_WritePhyUshort(sc, 0x19, 0x9df7);
13201                 MP_WritePhyUshort(sc, 0x15, 0x03af);
13202                 MP_WritePhyUshort(sc, 0x19, 0x7c03);
13203                 MP_WritePhyUshort(sc, 0x15, 0x03b0);
13204                 MP_WritePhyUshort(sc, 0x19, 0x6c08);
13205                 MP_WritePhyUshort(sc, 0x15, 0x03b1);
13206                 MP_WritePhyUshort(sc, 0x19, 0x33b6);
13207                 MP_WritePhyUshort(sc, 0x15, 0x03b2);
13208                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13209                 MP_WritePhyUshort(sc, 0x15, 0x03b3);
13210                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13211                 MP_WritePhyUshort(sc, 0x15, 0x03b4);
13212                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13213                 MP_WritePhyUshort(sc, 0x15, 0x03b5);
13214                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13215                 MP_WritePhyUshort(sc, 0x15, 0x03b6);
13216                 MP_WritePhyUshort(sc, 0x19, 0x55af);
13217                 MP_WritePhyUshort(sc, 0x15, 0x03b7);
13218                 MP_WritePhyUshort(sc, 0x19, 0x7ff0);
13219                 MP_WritePhyUshort(sc, 0x15, 0x03b8);
13220                 MP_WritePhyUshort(sc, 0x19, 0x6ff0);
13221                 MP_WritePhyUshort(sc, 0x15, 0x03b9);
13222                 MP_WritePhyUshort(sc, 0x19, 0x4bb9);
13223                 MP_WritePhyUshort(sc, 0x15, 0x03ba);
13224                 MP_WritePhyUshort(sc, 0x19, 0x6a80);
13225                 MP_WritePhyUshort(sc, 0x15, 0x03bb);
13226                 MP_WritePhyUshort(sc, 0x19, 0x4b29);
13227                 MP_WritePhyUshort(sc, 0x15, 0x03bc);
13228                 MP_WritePhyUshort(sc, 0x19, 0x4041);
13229                 MP_WritePhyUshort(sc, 0x15, 0x03bd);
13230                 MP_WritePhyUshort(sc, 0x19, 0x440a);
13231                 MP_WritePhyUshort(sc, 0x15, 0x03be);
13232                 MP_WritePhyUshort(sc, 0x19, 0x4029);
13233                 MP_WritePhyUshort(sc, 0x15, 0x03bf);
13234                 MP_WritePhyUshort(sc, 0x19, 0x4418);
13235                 MP_WritePhyUshort(sc, 0x15, 0x03c0);
13236                 MP_WritePhyUshort(sc, 0x19, 0x4090);
13237                 MP_WritePhyUshort(sc, 0x15, 0x03c1);
13238                 MP_WritePhyUshort(sc, 0x19, 0x4438);
13239                 MP_WritePhyUshort(sc, 0x15, 0x03c2);
13240                 MP_WritePhyUshort(sc, 0x19, 0x40c4);
13241                 MP_WritePhyUshort(sc, 0x15, 0x03c3);
13242                 MP_WritePhyUshort(sc, 0x19, 0x447b);
13243                 MP_WritePhyUshort(sc, 0x15, 0x03c4);
13244                 MP_WritePhyUshort(sc, 0x19, 0xb6c4);
13245                 MP_WritePhyUshort(sc, 0x15, 0x03c5);
13246                 MP_WritePhyUshort(sc, 0x19, 0x3311);
13247                 MP_WritePhyUshort(sc, 0x15, 0x03c6);
13248                 MP_WritePhyUshort(sc, 0x19, 0x9bfe);
13249                 MP_WritePhyUshort(sc, 0x15, 0x03c7);
13250                 MP_WritePhyUshort(sc, 0x19, 0x33cc);
13251                 MP_WritePhyUshort(sc, 0x15, 0x03c8);
13252                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13253                 MP_WritePhyUshort(sc, 0x15, 0x03c9);
13254                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13255                 MP_WritePhyUshort(sc, 0x15, 0x03ca);
13256                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13257                 MP_WritePhyUshort(sc, 0x15, 0x03cb);
13258                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13259                 MP_WritePhyUshort(sc, 0x15, 0x03cc);
13260                 MP_WritePhyUshort(sc, 0x19, 0x542f);
13261                 MP_WritePhyUshort(sc, 0x15, 0x03cd);
13262                 MP_WritePhyUshort(sc, 0x19, 0x499a);
13263                 MP_WritePhyUshort(sc, 0x15, 0x03ce);
13264                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
13265                 MP_WritePhyUshort(sc, 0x15, 0x03cf);
13266                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
13267                 MP_WritePhyUshort(sc, 0x15, 0x03d0);
13268                 MP_WritePhyUshort(sc, 0x19, 0x490a);
13269                 MP_WritePhyUshort(sc, 0x15, 0x03d1);
13270                 MP_WritePhyUshort(sc, 0x19, 0x405e);
13271                 MP_WritePhyUshort(sc, 0x15, 0x03d2);
13272                 MP_WritePhyUshort(sc, 0x19, 0x44f8);
13273                 MP_WritePhyUshort(sc, 0x15, 0x03d3);
13274                 MP_WritePhyUshort(sc, 0x19, 0x6b00);
13275                 MP_WritePhyUshort(sc, 0x15, 0x03d4);
13276                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
13277                 MP_WritePhyUshort(sc, 0x15, 0x03d5);
13278                 MP_WritePhyUshort(sc, 0x19, 0x0028);
13279                 MP_WritePhyUshort(sc, 0x15, 0x03d6);
13280                 MP_WritePhyUshort(sc, 0x19, 0x3311);
13281                 MP_WritePhyUshort(sc, 0x15, 0x03d7);
13282                 MP_WritePhyUshort(sc, 0x19, 0xbd27);
13283                 MP_WritePhyUshort(sc, 0x15, 0x03d8);
13284                 MP_WritePhyUshort(sc, 0x19, 0x9cfc);
13285                 MP_WritePhyUshort(sc, 0x15, 0x03d9);
13286                 MP_WritePhyUshort(sc, 0x19, 0xc639);
13287                 MP_WritePhyUshort(sc, 0x15, 0x03da);
13288                 MP_WritePhyUshort(sc, 0x19, 0x000f);
13289                 MP_WritePhyUshort(sc, 0x15, 0x03db);
13290                 MP_WritePhyUshort(sc, 0x19, 0x9e03);
13291                 MP_WritePhyUshort(sc, 0x15, 0x03dc);
13292                 MP_WritePhyUshort(sc, 0x19, 0x7c01);
13293                 MP_WritePhyUshort(sc, 0x15, 0x03dd);
13294                 MP_WritePhyUshort(sc, 0x19, 0x4c01);
13295                 MP_WritePhyUshort(sc, 0x15, 0x03de);
13296                 MP_WritePhyUshort(sc, 0x19, 0x9af6);
13297                 MP_WritePhyUshort(sc, 0x15, 0x03df);
13298                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
13299                 MP_WritePhyUshort(sc, 0x15, 0x03e0);
13300                 MP_WritePhyUshort(sc, 0x19, 0x4c52);
13301                 MP_WritePhyUshort(sc, 0x15, 0x03e1);
13302                 MP_WritePhyUshort(sc, 0x19, 0x4470);
13303                 MP_WritePhyUshort(sc, 0x15, 0x03e2);
13304                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
13305                 MP_WritePhyUshort(sc, 0x15, 0x03e3);
13306                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
13307                 MP_WritePhyUshort(sc, 0x15, 0x03e4);
13308                 MP_WritePhyUshort(sc, 0x19, 0x33d4);
13309                 MP_WritePhyUshort(sc, 0x15, 0x03e5);
13310                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13311                 MP_WritePhyUshort(sc, 0x15, 0x03e6);
13312                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13313                 MP_WritePhyUshort(sc, 0x15, 0x03e7);
13314                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13315                 MP_WritePhyUshort(sc, 0x15, 0x03e8);
13316                 MP_WritePhyUshort(sc, 0x19, 0x0000);
13317                 MP_WritePhyUshort(sc, 0x15, 0x03e9);
13318                 MP_WritePhyUshort(sc, 0x19, 0x49bb);
13319                 MP_WritePhyUshort(sc, 0x15, 0x03ea);
13320                 MP_WritePhyUshort(sc, 0x19, 0x4478);
13321                 MP_WritePhyUshort(sc, 0x15, 0x03eb);
13322                 MP_WritePhyUshort(sc, 0x19, 0x492b);
13323                 MP_WritePhyUshort(sc, 0x15, 0x03ec);
13324                 MP_WritePhyUshort(sc, 0x19, 0x6b80);
13325                 MP_WritePhyUshort(sc, 0x15, 0x03ed);
13326                 MP_WritePhyUshort(sc, 0x19, 0x7c01);
13327                 MP_WritePhyUshort(sc, 0x15, 0x03ee);
13328                 MP_WritePhyUshort(sc, 0x19, 0x4c00);
13329                 MP_WritePhyUshort(sc, 0x15, 0x03ef);
13330                 MP_WritePhyUshort(sc, 0x19, 0xd64f);
13331                 MP_WritePhyUshort(sc, 0x15, 0x03f0);
13332                 MP_WritePhyUshort(sc, 0x19, 0x000d);
13333                 MP_WritePhyUshort(sc, 0x15, 0x03f1);
13334                 MP_WritePhyUshort(sc, 0x19, 0x3311);
13335                 MP_WritePhyUshort(sc, 0x15, 0x03f2);
13336                 MP_WritePhyUshort(sc, 0x19, 0xbd0c);
13337                 MP_WritePhyUshort(sc, 0x15, 0x03f3);
13338                 MP_WritePhyUshort(sc, 0x19, 0xc428);
13339                 MP_WritePhyUshort(sc, 0x15, 0x03f4);
13340                 MP_WritePhyUshort(sc, 0x19, 0x0008);
13341                 MP_WritePhyUshort(sc, 0x15, 0x03f5);
13342                 MP_WritePhyUshort(sc, 0x19, 0x9afa);
13343                 MP_WritePhyUshort(sc, 0x15, 0x03f6);
13344                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
13345                 MP_WritePhyUshort(sc, 0x15, 0x03f7);
13346                 MP_WritePhyUshort(sc, 0x19, 0x4c52);
13347                 MP_WritePhyUshort(sc, 0x15, 0x03f8);
13348                 MP_WritePhyUshort(sc, 0x19, 0x4470);
13349                 MP_WritePhyUshort(sc, 0x15, 0x03f9);
13350                 MP_WritePhyUshort(sc, 0x19, 0x7c12);
13351                 MP_WritePhyUshort(sc, 0x15, 0x03fa);
13352                 MP_WritePhyUshort(sc, 0x19, 0x4c40);
13353                 MP_WritePhyUshort(sc, 0x15, 0x03fb);
13354                 MP_WritePhyUshort(sc, 0x19, 0x33ef);
13355                 MP_WritePhyUshort(sc, 0x15, 0x03fc);
13356                 MP_WritePhyUshort(sc, 0x19, 0x3342);
13357                 MP_WritePhyUshort(sc, 0x15, 0x03fd);
13358                 MP_WritePhyUshort(sc, 0x19, 0x330d);
13359                 MP_WritePhyUshort(sc, 0x15, 0x03fe);
13360                 MP_WritePhyUshort(sc, 0x19, 0x32ae);
13361                 MP_WritePhyUshort(sc, 0x15, 0x0000);
13362                 MP_WritePhyUshort(sc, 0x16, 0x0306);
13363                 MP_WritePhyUshort(sc, 0x16, 0x0300);
13364                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
13365                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13366                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
13367                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
13368                 MP_WritePhyUshort(sc, 0x06, 0x0080);
13369                 MP_WritePhyUshort(sc, 0x05, 0x8000);
13370                 MP_WritePhyUshort(sc, 0x06, 0x0280);
13371                 MP_WritePhyUshort(sc, 0x06, 0x48f7);
13372                 MP_WritePhyUshort(sc, 0x06, 0x00e0);
13373                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
13374                 MP_WritePhyUshort(sc, 0x06, 0xa080);
13375                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
13376                 MP_WritePhyUshort(sc, 0x06, 0xf602);
13377                 MP_WritePhyUshort(sc, 0x06, 0x0112);
13378                 MP_WritePhyUshort(sc, 0x06, 0x0201);
13379                 MP_WritePhyUshort(sc, 0x06, 0x1f02);
13380                 MP_WritePhyUshort(sc, 0x06, 0x012c);
13381                 MP_WritePhyUshort(sc, 0x06, 0x0201);
13382                 MP_WritePhyUshort(sc, 0x06, 0x3c02);
13383                 MP_WritePhyUshort(sc, 0x06, 0x0156);
13384                 MP_WritePhyUshort(sc, 0x06, 0x0201);
13385                 MP_WritePhyUshort(sc, 0x06, 0x6d02);
13386                 MP_WritePhyUshort(sc, 0x06, 0x809d);
13387                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
13388                 MP_WritePhyUshort(sc, 0x06, 0x88e1);
13389                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
13390                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
13391                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
13392                 MP_WritePhyUshort(sc, 0x06, 0x8a1e);
13393                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
13394                 MP_WritePhyUshort(sc, 0x06, 0x8b8b);
13395                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
13396                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
13397                 MP_WritePhyUshort(sc, 0x06, 0x8c1e);
13398                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
13399                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
13400                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
13401                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
13402                 MP_WritePhyUshort(sc, 0x06, 0x8e1e);
13403                 MP_WritePhyUshort(sc, 0x06, 0x01a0);
13404                 MP_WritePhyUshort(sc, 0x06, 0x00c7);
13405                 MP_WritePhyUshort(sc, 0x06, 0xaebb);
13406                 MP_WritePhyUshort(sc, 0x06, 0xd100);
13407                 MP_WritePhyUshort(sc, 0x06, 0xbf82);
13408                 MP_WritePhyUshort(sc, 0x06, 0xc702);
13409                 MP_WritePhyUshort(sc, 0x06, 0x320a);
13410                 MP_WritePhyUshort(sc, 0x06, 0xd105);
13411                 MP_WritePhyUshort(sc, 0x06, 0xbf82);
13412                 MP_WritePhyUshort(sc, 0x06, 0xcd02);
13413                 MP_WritePhyUshort(sc, 0x06, 0x320a);
13414                 MP_WritePhyUshort(sc, 0x06, 0xd100);
13415                 MP_WritePhyUshort(sc, 0x06, 0xbf82);
13416                 MP_WritePhyUshort(sc, 0x06, 0xca02);
13417                 MP_WritePhyUshort(sc, 0x06, 0x320a);
13418                 MP_WritePhyUshort(sc, 0x06, 0xd105);
13419                 MP_WritePhyUshort(sc, 0x06, 0xbf82);
13420                 MP_WritePhyUshort(sc, 0x06, 0xd002);
13421                 MP_WritePhyUshort(sc, 0x06, 0x320a);
13422                 MP_WritePhyUshort(sc, 0x06, 0xd481);
13423                 MP_WritePhyUshort(sc, 0x06, 0xc9e4);
13424                 MP_WritePhyUshort(sc, 0x06, 0x8b90);
13425                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
13426                 MP_WritePhyUshort(sc, 0x06, 0x91d4);
13427                 MP_WritePhyUshort(sc, 0x06, 0x81b8);
13428                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
13429                 MP_WritePhyUshort(sc, 0x06, 0x92e5);
13430                 MP_WritePhyUshort(sc, 0x06, 0x8b93);
13431                 MP_WritePhyUshort(sc, 0x06, 0xbf8b);
13432                 MP_WritePhyUshort(sc, 0x06, 0x88ec);
13433                 MP_WritePhyUshort(sc, 0x06, 0x0019);
13434                 MP_WritePhyUshort(sc, 0x06, 0xa98b);
13435                 MP_WritePhyUshort(sc, 0x06, 0x90f9);
13436                 MP_WritePhyUshort(sc, 0x06, 0xeeff);
13437                 MP_WritePhyUshort(sc, 0x06, 0xf600);
13438                 MP_WritePhyUshort(sc, 0x06, 0xeeff);
13439                 MP_WritePhyUshort(sc, 0x06, 0xf7fc);
13440                 MP_WritePhyUshort(sc, 0x06, 0xd100);
13441                 MP_WritePhyUshort(sc, 0x06, 0xbf82);
13442                 MP_WritePhyUshort(sc, 0x06, 0xc102);
13443                 MP_WritePhyUshort(sc, 0x06, 0x320a);
13444                 MP_WritePhyUshort(sc, 0x06, 0xd101);
13445                 MP_WritePhyUshort(sc, 0x06, 0xbf82);
13446                 MP_WritePhyUshort(sc, 0x06, 0xc402);
13447                 MP_WritePhyUshort(sc, 0x06, 0x320a);
13448                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
13449                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
13450                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
13451                 MP_WritePhyUshort(sc, 0x06, 0x201a);
13452                 MP_WritePhyUshort(sc, 0x06, 0xf620);
13453                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
13454                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
13455                 MP_WritePhyUshort(sc, 0x06, 0x824b);
13456                 MP_WritePhyUshort(sc, 0x06, 0x0281);
13457                 MP_WritePhyUshort(sc, 0x06, 0x1902);
13458                 MP_WritePhyUshort(sc, 0x06, 0x2c9d);
13459                 MP_WritePhyUshort(sc, 0x06, 0x0203);
13460                 MP_WritePhyUshort(sc, 0x06, 0x9602);
13461                 MP_WritePhyUshort(sc, 0x06, 0x0473);
13462                 MP_WritePhyUshort(sc, 0x06, 0x022e);
13463                 MP_WritePhyUshort(sc, 0x06, 0x3902);
13464                 MP_WritePhyUshort(sc, 0x06, 0x044d);
13465                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
13466                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
13467                 MP_WritePhyUshort(sc, 0x06, 0x210b);
13468                 MP_WritePhyUshort(sc, 0x06, 0xf621);
13469                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
13470                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
13471                 MP_WritePhyUshort(sc, 0x06, 0x0416);
13472                 MP_WritePhyUshort(sc, 0x06, 0x021b);
13473                 MP_WritePhyUshort(sc, 0x06, 0xa4e0);
13474                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
13475                 MP_WritePhyUshort(sc, 0x06, 0xad22);
13476                 MP_WritePhyUshort(sc, 0x06, 0x05f6);
13477                 MP_WritePhyUshort(sc, 0x06, 0x22e4);
13478                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
13479                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
13480                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
13481                 MP_WritePhyUshort(sc, 0x06, 0x2305);
13482                 MP_WritePhyUshort(sc, 0x06, 0xf623);
13483                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
13484                 MP_WritePhyUshort(sc, 0x06, 0x8ee0);
13485                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
13486                 MP_WritePhyUshort(sc, 0x06, 0xad24);
13487                 MP_WritePhyUshort(sc, 0x06, 0x05f6);
13488                 MP_WritePhyUshort(sc, 0x06, 0x24e4);
13489                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
13490                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
13491                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
13492                 MP_WritePhyUshort(sc, 0x06, 0x2505);
13493                 MP_WritePhyUshort(sc, 0x06, 0xf625);
13494                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
13495                 MP_WritePhyUshort(sc, 0x06, 0x8ee0);
13496                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
13497                 MP_WritePhyUshort(sc, 0x06, 0xad26);
13498                 MP_WritePhyUshort(sc, 0x06, 0x08f6);
13499                 MP_WritePhyUshort(sc, 0x06, 0x26e4);
13500                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
13501                 MP_WritePhyUshort(sc, 0x06, 0x0281);
13502                 MP_WritePhyUshort(sc, 0x06, 0xdae0);
13503                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
13504                 MP_WritePhyUshort(sc, 0x06, 0xad27);
13505                 MP_WritePhyUshort(sc, 0x06, 0x05f6);
13506                 MP_WritePhyUshort(sc, 0x06, 0x27e4);
13507                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
13508                 MP_WritePhyUshort(sc, 0x06, 0x0203);
13509                 MP_WritePhyUshort(sc, 0x06, 0x5cfc);
13510                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
13511                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
13512                 MP_WritePhyUshort(sc, 0x06, 0x69e0);
13513                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
13514                 MP_WritePhyUshort(sc, 0x06, 0xad21);
13515                 MP_WritePhyUshort(sc, 0x06, 0x57e0);
13516                 MP_WritePhyUshort(sc, 0x06, 0xe022);
13517                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
13518                 MP_WritePhyUshort(sc, 0x06, 0x2358);
13519                 MP_WritePhyUshort(sc, 0x06, 0xc059);
13520                 MP_WritePhyUshort(sc, 0x06, 0x021e);
13521                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
13522                 MP_WritePhyUshort(sc, 0x06, 0x8b3c);
13523                 MP_WritePhyUshort(sc, 0x06, 0x1f10);
13524                 MP_WritePhyUshort(sc, 0x06, 0x9e44);
13525                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
13526                 MP_WritePhyUshort(sc, 0x06, 0x3cad);
13527                 MP_WritePhyUshort(sc, 0x06, 0x211d);
13528                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
13529                 MP_WritePhyUshort(sc, 0x06, 0x84f7);
13530                 MP_WritePhyUshort(sc, 0x06, 0x29e5);
13531                 MP_WritePhyUshort(sc, 0x06, 0x8b84);
13532                 MP_WritePhyUshort(sc, 0x06, 0xac27);
13533                 MP_WritePhyUshort(sc, 0x06, 0x0dac);
13534                 MP_WritePhyUshort(sc, 0x06, 0x2605);
13535                 MP_WritePhyUshort(sc, 0x06, 0x0281);
13536                 MP_WritePhyUshort(sc, 0x06, 0x7fae);
13537                 MP_WritePhyUshort(sc, 0x06, 0x2b02);
13538                 MP_WritePhyUshort(sc, 0x06, 0x2c23);
13539                 MP_WritePhyUshort(sc, 0x06, 0xae26);
13540                 MP_WritePhyUshort(sc, 0x06, 0x022c);
13541                 MP_WritePhyUshort(sc, 0x06, 0x41ae);
13542                 MP_WritePhyUshort(sc, 0x06, 0x21e0);
13543                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
13544                 MP_WritePhyUshort(sc, 0x06, 0xad22);
13545                 MP_WritePhyUshort(sc, 0x06, 0x18e0);
13546                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
13547                 MP_WritePhyUshort(sc, 0x06, 0x58fc);
13548                 MP_WritePhyUshort(sc, 0x06, 0xe4ff);
13549                 MP_WritePhyUshort(sc, 0x06, 0xf7d1);
13550                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
13551                 MP_WritePhyUshort(sc, 0x06, 0x2eee);
13552                 MP_WritePhyUshort(sc, 0x06, 0x0232);
13553                 MP_WritePhyUshort(sc, 0x06, 0x0ad1);
13554                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
13555                 MP_WritePhyUshort(sc, 0x06, 0x82e8);
13556                 MP_WritePhyUshort(sc, 0x06, 0x0232);
13557                 MP_WritePhyUshort(sc, 0x06, 0x0a02);
13558                 MP_WritePhyUshort(sc, 0x06, 0x2bdf);
13559                 MP_WritePhyUshort(sc, 0x06, 0xef96);
13560                 MP_WritePhyUshort(sc, 0x06, 0xfefc);
13561                 MP_WritePhyUshort(sc, 0x06, 0x04d0);
13562                 MP_WritePhyUshort(sc, 0x06, 0x0202);
13563                 MP_WritePhyUshort(sc, 0x06, 0x1e97);
13564                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
13565                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
13566                 MP_WritePhyUshort(sc, 0x06, 0x2228);
13567                 MP_WritePhyUshort(sc, 0x06, 0xd100);
13568                 MP_WritePhyUshort(sc, 0x06, 0xbf82);
13569                 MP_WritePhyUshort(sc, 0x06, 0xd302);
13570                 MP_WritePhyUshort(sc, 0x06, 0x320a);
13571                 MP_WritePhyUshort(sc, 0x06, 0xd10c);
13572                 MP_WritePhyUshort(sc, 0x06, 0xbf82);
13573                 MP_WritePhyUshort(sc, 0x06, 0xd602);
13574                 MP_WritePhyUshort(sc, 0x06, 0x320a);
13575                 MP_WritePhyUshort(sc, 0x06, 0xd104);
13576                 MP_WritePhyUshort(sc, 0x06, 0xbf82);
13577                 MP_WritePhyUshort(sc, 0x06, 0xd902);
13578                 MP_WritePhyUshort(sc, 0x06, 0x320a);
13579                 MP_WritePhyUshort(sc, 0x06, 0xd101);
13580                 MP_WritePhyUshort(sc, 0x06, 0xbf82);
13581                 MP_WritePhyUshort(sc, 0x06, 0xe802);
13582                 MP_WritePhyUshort(sc, 0x06, 0x320a);
13583                 MP_WritePhyUshort(sc, 0x06, 0xe0ff);
13584                 MP_WritePhyUshort(sc, 0x06, 0xf768);
13585                 MP_WritePhyUshort(sc, 0x06, 0x03e4);
13586                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
13587                 MP_WritePhyUshort(sc, 0x06, 0xd004);
13588                 MP_WritePhyUshort(sc, 0x06, 0x0228);
13589                 MP_WritePhyUshort(sc, 0x06, 0x7a04);
13590                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
13591                 MP_WritePhyUshort(sc, 0x06, 0xe234);
13592                 MP_WritePhyUshort(sc, 0x06, 0xe1e2);
13593                 MP_WritePhyUshort(sc, 0x06, 0x35f6);
13594                 MP_WritePhyUshort(sc, 0x06, 0x2be4);
13595                 MP_WritePhyUshort(sc, 0x06, 0xe234);
13596                 MP_WritePhyUshort(sc, 0x06, 0xe5e2);
13597                 MP_WritePhyUshort(sc, 0x06, 0x35fc);
13598                 MP_WritePhyUshort(sc, 0x06, 0x05f8);
13599                 MP_WritePhyUshort(sc, 0x06, 0xe0e2);
13600                 MP_WritePhyUshort(sc, 0x06, 0x34e1);
13601                 MP_WritePhyUshort(sc, 0x06, 0xe235);
13602                 MP_WritePhyUshort(sc, 0x06, 0xf72b);
13603                 MP_WritePhyUshort(sc, 0x06, 0xe4e2);
13604                 MP_WritePhyUshort(sc, 0x06, 0x34e5);
13605                 MP_WritePhyUshort(sc, 0x06, 0xe235);
13606                 MP_WritePhyUshort(sc, 0x06, 0xfc05);
13607                 MP_WritePhyUshort(sc, 0x06, 0xf8f9);
13608                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
13609                 MP_WritePhyUshort(sc, 0x06, 0x69ac);
13610                 MP_WritePhyUshort(sc, 0x06, 0x1b4c);
13611                 MP_WritePhyUshort(sc, 0x06, 0xbf2e);
13612                 MP_WritePhyUshort(sc, 0x06, 0x3002);
13613                 MP_WritePhyUshort(sc, 0x06, 0x31dd);
13614                 MP_WritePhyUshort(sc, 0x06, 0xef01);
13615                 MP_WritePhyUshort(sc, 0x06, 0xe28a);
13616                 MP_WritePhyUshort(sc, 0x06, 0x76e4);
13617                 MP_WritePhyUshort(sc, 0x06, 0x8a76);
13618                 MP_WritePhyUshort(sc, 0x06, 0x1f12);
13619                 MP_WritePhyUshort(sc, 0x06, 0x9e3a);
13620                 MP_WritePhyUshort(sc, 0x06, 0xef12);
13621                 MP_WritePhyUshort(sc, 0x06, 0x5907);
13622                 MP_WritePhyUshort(sc, 0x06, 0x9f12);
13623                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
13624                 MP_WritePhyUshort(sc, 0x06, 0x8b40);
13625                 MP_WritePhyUshort(sc, 0x06, 0xf721);
13626                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
13627                 MP_WritePhyUshort(sc, 0x06, 0x40d0);
13628                 MP_WritePhyUshort(sc, 0x06, 0x0302);
13629                 MP_WritePhyUshort(sc, 0x06, 0x287a);
13630                 MP_WritePhyUshort(sc, 0x06, 0x0282);
13631                 MP_WritePhyUshort(sc, 0x06, 0x34fc);
13632                 MP_WritePhyUshort(sc, 0x06, 0xa000);
13633                 MP_WritePhyUshort(sc, 0x06, 0x1002);
13634                 MP_WritePhyUshort(sc, 0x06, 0x2dc3);
13635                 MP_WritePhyUshort(sc, 0x06, 0x022e);
13636                 MP_WritePhyUshort(sc, 0x06, 0x21e0);
13637                 MP_WritePhyUshort(sc, 0x06, 0x8b40);
13638                 MP_WritePhyUshort(sc, 0x06, 0xf621);
13639                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
13640                 MP_WritePhyUshort(sc, 0x06, 0x40ae);
13641                 MP_WritePhyUshort(sc, 0x06, 0x0fbf);
13642                 MP_WritePhyUshort(sc, 0x06, 0x3fa5);
13643                 MP_WritePhyUshort(sc, 0x06, 0x0231);
13644                 MP_WritePhyUshort(sc, 0x06, 0x6cbf);
13645                 MP_WritePhyUshort(sc, 0x06, 0x3fa2);
13646                 MP_WritePhyUshort(sc, 0x06, 0x0231);
13647                 MP_WritePhyUshort(sc, 0x06, 0x6c02);
13648                 MP_WritePhyUshort(sc, 0x06, 0x2dc3);
13649                 MP_WritePhyUshort(sc, 0x06, 0xef96);
13650                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
13651                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
13652                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
13653                 MP_WritePhyUshort(sc, 0x06, 0xe2f4);
13654                 MP_WritePhyUshort(sc, 0x06, 0xe1e2);
13655                 MP_WritePhyUshort(sc, 0x06, 0xf5e4);
13656                 MP_WritePhyUshort(sc, 0x06, 0x8a78);
13657                 MP_WritePhyUshort(sc, 0x06, 0xe58a);
13658                 MP_WritePhyUshort(sc, 0x06, 0x79ee);
13659                 MP_WritePhyUshort(sc, 0x06, 0xe2f4);
13660                 MP_WritePhyUshort(sc, 0x06, 0xd8ee);
13661                 MP_WritePhyUshort(sc, 0x06, 0xe2f5);
13662                 MP_WritePhyUshort(sc, 0x06, 0x20fc);
13663                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
13664                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
13665                 MP_WritePhyUshort(sc, 0x06, 0xef69);
13666                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
13667                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
13668                 MP_WritePhyUshort(sc, 0x06, 0x2065);
13669                 MP_WritePhyUshort(sc, 0x06, 0xd200);
13670                 MP_WritePhyUshort(sc, 0x06, 0xbf2e);
13671                 MP_WritePhyUshort(sc, 0x06, 0xe802);
13672                 MP_WritePhyUshort(sc, 0x06, 0x31dd);
13673                 MP_WritePhyUshort(sc, 0x06, 0x1e21);
13674                 MP_WritePhyUshort(sc, 0x06, 0xbf82);
13675                 MP_WritePhyUshort(sc, 0x06, 0xdf02);
13676                 MP_WritePhyUshort(sc, 0x06, 0x31dd);
13677                 MP_WritePhyUshort(sc, 0x06, 0x0c11);
13678                 MP_WritePhyUshort(sc, 0x06, 0x1e21);
13679                 MP_WritePhyUshort(sc, 0x06, 0xbf82);
13680                 MP_WritePhyUshort(sc, 0x06, 0xe202);
13681                 MP_WritePhyUshort(sc, 0x06, 0x31dd);
13682                 MP_WritePhyUshort(sc, 0x06, 0x0c12);
13683                 MP_WritePhyUshort(sc, 0x06, 0x1e21);
13684                 MP_WritePhyUshort(sc, 0x06, 0xbf82);
13685                 MP_WritePhyUshort(sc, 0x06, 0xe502);
13686                 MP_WritePhyUshort(sc, 0x06, 0x31dd);
13687                 MP_WritePhyUshort(sc, 0x06, 0x0c13);
13688                 MP_WritePhyUshort(sc, 0x06, 0x1e21);
13689                 MP_WritePhyUshort(sc, 0x06, 0xbf1f);
13690                 MP_WritePhyUshort(sc, 0x06, 0x5302);
13691                 MP_WritePhyUshort(sc, 0x06, 0x31dd);
13692                 MP_WritePhyUshort(sc, 0x06, 0x0c14);
13693                 MP_WritePhyUshort(sc, 0x06, 0x1e21);
13694                 MP_WritePhyUshort(sc, 0x06, 0xbf82);
13695                 MP_WritePhyUshort(sc, 0x06, 0xeb02);
13696                 MP_WritePhyUshort(sc, 0x06, 0x31dd);
13697                 MP_WritePhyUshort(sc, 0x06, 0x0c16);
13698                 MP_WritePhyUshort(sc, 0x06, 0x1e21);
13699                 MP_WritePhyUshort(sc, 0x06, 0xe083);
13700                 MP_WritePhyUshort(sc, 0x06, 0xe01f);
13701                 MP_WritePhyUshort(sc, 0x06, 0x029e);
13702                 MP_WritePhyUshort(sc, 0x06, 0x22e6);
13703                 MP_WritePhyUshort(sc, 0x06, 0x83e0);
13704                 MP_WritePhyUshort(sc, 0x06, 0xad31);
13705                 MP_WritePhyUshort(sc, 0x06, 0x14ad);
13706                 MP_WritePhyUshort(sc, 0x06, 0x3011);
13707                 MP_WritePhyUshort(sc, 0x06, 0xef02);
13708                 MP_WritePhyUshort(sc, 0x06, 0x580c);
13709                 MP_WritePhyUshort(sc, 0x06, 0x9e07);
13710                 MP_WritePhyUshort(sc, 0x06, 0xad36);
13711                 MP_WritePhyUshort(sc, 0x06, 0x085a);
13712                 MP_WritePhyUshort(sc, 0x06, 0x309f);
13713                 MP_WritePhyUshort(sc, 0x06, 0x04d1);
13714                 MP_WritePhyUshort(sc, 0x06, 0x01ae);
13715                 MP_WritePhyUshort(sc, 0x06, 0x02d1);
13716                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
13717                 MP_WritePhyUshort(sc, 0x06, 0x82dc);
13718                 MP_WritePhyUshort(sc, 0x06, 0x0232);
13719                 MP_WritePhyUshort(sc, 0x06, 0x0aef);
13720                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
13721                 MP_WritePhyUshort(sc, 0x06, 0xfdfc);
13722                 MP_WritePhyUshort(sc, 0x06, 0x0400);
13723                 MP_WritePhyUshort(sc, 0x06, 0xe140);
13724                 MP_WritePhyUshort(sc, 0x06, 0x77e1);
13725                 MP_WritePhyUshort(sc, 0x06, 0x4010);
13726                 MP_WritePhyUshort(sc, 0x06, 0xe150);
13727                 MP_WritePhyUshort(sc, 0x06, 0x32e1);
13728                 MP_WritePhyUshort(sc, 0x06, 0x5030);
13729                 MP_WritePhyUshort(sc, 0x06, 0xe144);
13730                 MP_WritePhyUshort(sc, 0x06, 0x74e1);
13731                 MP_WritePhyUshort(sc, 0x06, 0x44bb);
13732                 MP_WritePhyUshort(sc, 0x06, 0xe2d2);
13733                 MP_WritePhyUshort(sc, 0x06, 0x40e0);
13734                 MP_WritePhyUshort(sc, 0x06, 0x2cfc);
13735                 MP_WritePhyUshort(sc, 0x06, 0xe2cc);
13736                 MP_WritePhyUshort(sc, 0x06, 0xcce2);
13737                 MP_WritePhyUshort(sc, 0x06, 0x00cc);
13738                 MP_WritePhyUshort(sc, 0x06, 0xe000);
13739                 MP_WritePhyUshort(sc, 0x06, 0x99e0);
13740                 MP_WritePhyUshort(sc, 0x06, 0x3688);
13741                 MP_WritePhyUshort(sc, 0x06, 0xe036);
13742                 MP_WritePhyUshort(sc, 0x06, 0x99e1);
13743                 MP_WritePhyUshort(sc, 0x06, 0x40dd);
13744                 MP_WritePhyUshort(sc, 0x06, 0xe022);
13745                 MP_WritePhyUshort(sc, 0x05, 0xe142);
13746                 Data = MP_ReadPhyUshort(sc, 0x06);
13747                 Data |= BIT_0;
13748                 MP_WritePhyUshort(sc, 0x06, Data);
13749                 MP_WritePhyUshort(sc, 0x05, 0xe140);
13750                 Data = MP_ReadPhyUshort(sc, 0x06);
13751                 Data |= BIT_0;
13752                 MP_WritePhyUshort(sc, 0x06, Data);
13753                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13754                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
13755                 for (i = 0; i < 200; i++) {
13756                         DELAY(100);
13757                         Data = MP_ReadPhyUshort(sc, 0x00);
13758                         if (Data & BIT_7)
13759                                 break;
13760                 }
13761                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
13762                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
13763                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
13764                 Data = MP_ReadPhyUshort(sc, 0x17);
13765                 Data &= ~BIT_0;
13766                 Data |= BIT_2;
13767                 MP_WritePhyUshort(sc, 0x17, Data);
13768                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
13769                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13770                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
13771                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
13772                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
13773                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13774                 MP_WritePhyUshort(sc, 0x00, 0x9200);
13775
13776                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
13777                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
13778                 Data = MP_ReadPhyUshort(sc, 0x06);
13779                 Data |= BIT_2 | BIT_1;
13780                 MP_WritePhyUshort(sc, 0x06, Data);
13781                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13782
13783                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
13784                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
13785                 MP_WritePhyUshort(sc, 0x1e, 0x002D);
13786                 Data = MP_ReadPhyUshort(sc, 0x18);
13787                 Data |= BIT_4;
13788                 MP_WritePhyUshort(sc, 0x18, Data);
13789                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
13790                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13791                 Data = MP_ReadPhyUshort(sc, 0x14);
13792                 Data |= BIT_15;
13793                 MP_WritePhyUshort(sc, 0x14, Data);
13794
13795                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
13796                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
13797                 Data = MP_ReadPhyUshort(sc, 0x06);
13798                 Data |= BIT_0;
13799                 MP_WritePhyUshort(sc, 0x06, Data);
13800                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
13801
13802                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
13803                 MP_WritePhyUshort(sc, 0x0B, 0x6C14);
13804                 MP_WritePhyUshort(sc, 0x14, 0x7F3D);
13805                 MP_WritePhyUshort(sc, 0x1C, 0xFAFE);
13806                 MP_WritePhyUshort(sc, 0x08, 0x07C5);
13807                 MP_WritePhyUshort(sc, 0x10, 0xF090);
13808                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
13809                 MP_WritePhyUshort(sc, 0x14, 0x641A);
13810                 MP_WritePhyUshort(sc, 0x1A, 0x0606);
13811                 MP_WritePhyUshort(sc, 0x12, 0xF480);
13812                 MP_WritePhyUshort(sc, 0x13, 0x0747);
13813                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
13814
13815                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
13816                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
13817                 MP_WritePhyUshort(sc, 0x1E, 0x0078);
13818                 MP_WritePhyUshort(sc, 0x15, 0xA408);
13819                 MP_WritePhyUshort(sc, 0x17, 0x5100);
13820                 MP_WritePhyUshort(sc, 0x19, 0x0008);
13821                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
13822                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
13823
13824                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
13825                 MP_WritePhyUshort(sc, 0x0D, 0x0207);
13826                 MP_WritePhyUshort(sc, 0x02, 0x5FD0);
13827                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
13828
13829                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
13830                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
13831                 MP_WritePhyUshort(sc, 0x1E, 0x00A1);
13832                 Data = MP_ReadPhyUshort(sc, 0x1A);
13833                 Data &= ~BIT_2;
13834                 MP_WritePhyUshort(sc, 0x1A, Data);
13835                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
13836                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
13837
13838                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
13839                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
13840                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
13841                 Data = MP_ReadPhyUshort(sc, 0x16);
13842                 Data |= BIT_5;
13843                 MP_WritePhyUshort(sc, 0x16, Data);
13844                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
13845                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
13846
13847                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
13848                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
13849                 MP_WritePhyUshort(sc, 0x1E, 0x00AC);
13850                 MP_WritePhyUshort(sc, 0x18, 0x0006);
13851                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
13852                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
13853
13854                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
13855                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
13856                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
13857
13858                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
13859                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
13860                 Data = MP_ReadPhyUshort(sc, 0x06);
13861                 Data |= BIT_14;
13862                 MP_WritePhyUshort(sc, 0x06, Data);
13863                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
13864
13865                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
13866                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
13867                 Data = MP_ReadPhyUshort(sc, 0x06);
13868                 Data &= ~BIT_11;
13869                 MP_WritePhyUshort(sc, 0x06, Data);
13870                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
13871                 Data = MP_ReadPhyUshort(sc, 0x06);
13872                 Data &= ~BIT_11;
13873                 MP_WritePhyUshort(sc, 0x06, Data);
13874                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
13875                 Data = MP_ReadPhyUshort(sc, 0x06);
13876                 Data &= ~BIT_8;
13877                 MP_WritePhyUshort(sc, 0x06, Data);
13878                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
13879                 Data = MP_ReadPhyUshort(sc, 0x06);
13880                 Data |= BIT_8;
13881                 MP_WritePhyUshort(sc, 0x06, Data);
13882                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
13883                 Data = MP_ReadPhyUshort(sc, 0x06);
13884                 Data &= ~BIT_8;
13885                 MP_WritePhyUshort(sc, 0x06, Data);
13886                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
13887                 Data = MP_ReadPhyUshort(sc, 0x06);
13888                 Data &= ~BIT_8;
13889                 MP_WritePhyUshort(sc, 0x06, Data);
13890                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
13891                 Data = MP_ReadPhyUshort(sc, 0x06);
13892                 Data &= ~BIT_8;
13893                 MP_WritePhyUshort(sc, 0x06, Data);
13894                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
13895
13896                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
13897                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
13898                 Data = MP_ReadPhyUshort(sc, 0x06);
13899                 Data |= BIT_15;
13900                 MP_WritePhyUshort(sc, 0x06, Data);
13901                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13902
13903                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
13904                 Data = MP_ReadPhyUshort(sc, 0x19);
13905                 Data &= ~BIT_0;
13906                 MP_WritePhyUshort(sc, 0x19, Data);
13907                 Data = MP_ReadPhyUshort(sc, 0x10);
13908                 Data &= ~BIT_10;
13909                 MP_WritePhyUshort(sc, 0x10, Data);
13910                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13911         } else if (sc->re_type == MACFG_39) {
13912                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
13913                 Data_u32 &= ~BIT_1;
13914                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
13915
13916                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13917                 MP_WritePhyUshort(sc, 0x00, 0x1800);
13918                 Data = MP_ReadPhyUshort(sc, 0x15);
13919                 Data &= ~(BIT_12);
13920                 MP_WritePhyUshort(sc, 0x15, Data);
13921                 MP_WritePhyUshort(sc, 0x00, 0x4800);
13922                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
13923                 MP_WritePhyUshort(sc, 0x1e, 0x002f);
13924                 for (i = 0; i < 1000; i++) {
13925                         if (MP_ReadPhyUshort(sc, 0x1c) & BIT_7)
13926                                 break;
13927                         DELAY(100);
13928                 }
13929                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
13930                 MP_WritePhyUshort(sc, 0x00, 0x1800);
13931                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
13932                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
13933                 for (i = 0; i < 200; i++) {
13934                         if ((MP_ReadPhyUshort(sc, 0x17) & BIT_0) == 0)
13935                                 break;
13936                         DELAY(100);
13937                 }
13938                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
13939                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
13940                 MP_WritePhyUshort(sc, 0x06, 0x0080);
13941                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
13942                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
13943                 MP_WritePhyUshort(sc, 0x16, 0x0306);
13944                 MP_WritePhyUshort(sc, 0x16, 0x0307);
13945                 MP_WritePhyUshort(sc, 0x15, 0x00AF);
13946                 MP_WritePhyUshort(sc, 0x19, 0x4060);
13947                 MP_WritePhyUshort(sc, 0x15, 0x00B0);
13948                 MP_WritePhyUshort(sc, 0x19, 0x7800);
13949                 MP_WritePhyUshort(sc, 0x15, 0x00B1);
13950                 MP_WritePhyUshort(sc, 0x19, 0x7e00);
13951                 MP_WritePhyUshort(sc, 0x15, 0x00B2);
13952                 MP_WritePhyUshort(sc, 0x19, 0x72B0);
13953                 MP_WritePhyUshort(sc, 0x15, 0x00B3);
13954                 MP_WritePhyUshort(sc, 0x19, 0x7F00);
13955                 MP_WritePhyUshort(sc, 0x15, 0x00B4);
13956                 MP_WritePhyUshort(sc, 0x19, 0x73B0);
13957                 MP_WritePhyUshort(sc, 0x15, 0x0101);
13958                 MP_WritePhyUshort(sc, 0x19, 0x0005);
13959                 MP_WritePhyUshort(sc, 0x15, 0x0103);
13960                 MP_WritePhyUshort(sc, 0x19, 0x0003);
13961                 MP_WritePhyUshort(sc, 0x15, 0x0105);
13962                 MP_WritePhyUshort(sc, 0x19, 0x30FD);
13963                 MP_WritePhyUshort(sc, 0x15, 0x0106);
13964                 MP_WritePhyUshort(sc, 0x19, 0x9DF7);
13965                 MP_WritePhyUshort(sc, 0x15, 0x0107);
13966                 MP_WritePhyUshort(sc, 0x19, 0x30C6);
13967                 MP_WritePhyUshort(sc, 0x15, 0x0098);
13968                 MP_WritePhyUshort(sc, 0x19, 0x7c0b);
13969                 MP_WritePhyUshort(sc, 0x15, 0x0099);
13970                 MP_WritePhyUshort(sc, 0x19, 0x6c0b);
13971                 MP_WritePhyUshort(sc, 0x15, 0x00eb);
13972                 MP_WritePhyUshort(sc, 0x19, 0x6c0b);
13973                 MP_WritePhyUshort(sc, 0x15, 0x00f8);
13974                 MP_WritePhyUshort(sc, 0x19, 0x6f0b);
13975                 MP_WritePhyUshort(sc, 0x15, 0x00fe);
13976                 MP_WritePhyUshort(sc, 0x19, 0x6f0f);
13977                 MP_WritePhyUshort(sc, 0x15, 0x00db);
13978                 MP_WritePhyUshort(sc, 0x19, 0x6f09);
13979                 MP_WritePhyUshort(sc, 0x15, 0x00dc);
13980                 MP_WritePhyUshort(sc, 0x19, 0xaefd);
13981                 MP_WritePhyUshort(sc, 0x15, 0x00dd);
13982                 MP_WritePhyUshort(sc, 0x19, 0x6f0b);
13983                 MP_WritePhyUshort(sc, 0x15, 0x00de);
13984                 MP_WritePhyUshort(sc, 0x19, 0xc60b);
13985                 MP_WritePhyUshort(sc, 0x15, 0x00df);
13986                 MP_WritePhyUshort(sc, 0x19, 0x00fa);
13987                 MP_WritePhyUshort(sc, 0x15, 0x00e0);
13988                 MP_WritePhyUshort(sc, 0x19, 0x30e1);
13989                 MP_WritePhyUshort(sc, 0x15, 0x020c);
13990                 MP_WritePhyUshort(sc, 0x19, 0x3224);
13991                 MP_WritePhyUshort(sc, 0x15, 0x020e);
13992                 MP_WritePhyUshort(sc, 0x19, 0x9813);
13993                 MP_WritePhyUshort(sc, 0x15, 0x020f);
13994                 MP_WritePhyUshort(sc, 0x19, 0x7801);
13995                 MP_WritePhyUshort(sc, 0x15, 0x0210);
13996                 MP_WritePhyUshort(sc, 0x19, 0x930f);
13997                 MP_WritePhyUshort(sc, 0x15, 0x0211);
13998                 MP_WritePhyUshort(sc, 0x19, 0x9206);
13999                 MP_WritePhyUshort(sc, 0x15, 0x0212);
14000                 MP_WritePhyUshort(sc, 0x19, 0x4002);
14001                 MP_WritePhyUshort(sc, 0x15, 0x0213);
14002                 MP_WritePhyUshort(sc, 0x19, 0x7800);
14003                 MP_WritePhyUshort(sc, 0x15, 0x0214);
14004                 MP_WritePhyUshort(sc, 0x19, 0x588f);
14005                 MP_WritePhyUshort(sc, 0x15, 0x0215);
14006                 MP_WritePhyUshort(sc, 0x19, 0x5520);
14007                 MP_WritePhyUshort(sc, 0x15, 0x0216);
14008                 MP_WritePhyUshort(sc, 0x19, 0x3224);
14009                 MP_WritePhyUshort(sc, 0x15, 0x0217);
14010                 MP_WritePhyUshort(sc, 0x19, 0x4002);
14011                 MP_WritePhyUshort(sc, 0x15, 0x0218);
14012                 MP_WritePhyUshort(sc, 0x19, 0x7800);
14013                 MP_WritePhyUshort(sc, 0x15, 0x0219);
14014                 MP_WritePhyUshort(sc, 0x19, 0x588d);
14015                 MP_WritePhyUshort(sc, 0x15, 0x021a);
14016                 MP_WritePhyUshort(sc, 0x19, 0x5540);
14017                 MP_WritePhyUshort(sc, 0x15, 0x021b);
14018                 MP_WritePhyUshort(sc, 0x19, 0x9e03);
14019                 MP_WritePhyUshort(sc, 0x15, 0x021c);
14020                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
14021                 MP_WritePhyUshort(sc, 0x15, 0x021d);
14022                 MP_WritePhyUshort(sc, 0x19, 0x6840);
14023                 MP_WritePhyUshort(sc, 0x15, 0x021e);
14024                 MP_WritePhyUshort(sc, 0x19, 0x3224);
14025                 MP_WritePhyUshort(sc, 0x15, 0x021f);
14026                 MP_WritePhyUshort(sc, 0x19, 0x4002);
14027                 MP_WritePhyUshort(sc, 0x15, 0x0220);
14028                 MP_WritePhyUshort(sc, 0x19, 0x3224);
14029                 MP_WritePhyUshort(sc, 0x15, 0x0221);
14030                 MP_WritePhyUshort(sc, 0x19, 0x9e03);
14031                 MP_WritePhyUshort(sc, 0x15, 0x0222);
14032                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
14033                 MP_WritePhyUshort(sc, 0x15, 0x0223);
14034                 MP_WritePhyUshort(sc, 0x19, 0x6840);
14035                 MP_WritePhyUshort(sc, 0x15, 0x0224);
14036                 MP_WritePhyUshort(sc, 0x19, 0x7800);
14037                 MP_WritePhyUshort(sc, 0x15, 0x0225);
14038                 MP_WritePhyUshort(sc, 0x19, 0x3231);
14039                 MP_WritePhyUshort(sc, 0x15, 0x0000);
14040                 MP_WritePhyUshort(sc, 0x16, 0x0306);
14041                 MP_WritePhyUshort(sc, 0x16, 0x0300);
14042                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
14043                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14044                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14045                 MP_WritePhyUshort(sc, 0x17, 0x2160);
14046                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
14047                 MP_WritePhyUshort(sc, 0x1e, 0x0040);
14048                 MP_WritePhyUshort(sc, 0x18, 0x0004);
14049                 MP_WritePhyUshort(sc, 0x18, 0x09d4);
14050                 MP_WritePhyUshort(sc, 0x19, 0x4000);
14051                 MP_WritePhyUshort(sc, 0x18, 0x09e4);
14052                 MP_WritePhyUshort(sc, 0x19, 0x0800);
14053                 MP_WritePhyUshort(sc, 0x18, 0x09f4);
14054                 MP_WritePhyUshort(sc, 0x19, 0xff00);
14055                 MP_WritePhyUshort(sc, 0x18, 0x0a04);
14056                 MP_WritePhyUshort(sc, 0x19, 0x4000);
14057                 MP_WritePhyUshort(sc, 0x18, 0x0a14);
14058                 MP_WritePhyUshort(sc, 0x19, 0x0c00);
14059                 MP_WritePhyUshort(sc, 0x18, 0x0a24);
14060                 MP_WritePhyUshort(sc, 0x19, 0xff00);
14061                 MP_WritePhyUshort(sc, 0x18, 0x0a74);
14062                 MP_WritePhyUshort(sc, 0x19, 0xf600);
14063                 MP_WritePhyUshort(sc, 0x18, 0x1a24);
14064                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
14065                 MP_WritePhyUshort(sc, 0x18, 0x1a64);
14066                 MP_WritePhyUshort(sc, 0x19, 0x0500);
14067                 MP_WritePhyUshort(sc, 0x18, 0x1a74);
14068                 MP_WritePhyUshort(sc, 0x19, 0x9500);
14069                 MP_WritePhyUshort(sc, 0x18, 0x1a84);
14070                 MP_WritePhyUshort(sc, 0x19, 0x8000);
14071                 MP_WritePhyUshort(sc, 0x18, 0x1a94);
14072                 MP_WritePhyUshort(sc, 0x19, 0x7d00);
14073                 MP_WritePhyUshort(sc, 0x18, 0x1aa4);
14074                 MP_WritePhyUshort(sc, 0x19, 0x9600);
14075                 MP_WritePhyUshort(sc, 0x18, 0x1ac4);
14076                 MP_WritePhyUshort(sc, 0x19, 0x4000);
14077                 MP_WritePhyUshort(sc, 0x18, 0x1ad4);
14078                 MP_WritePhyUshort(sc, 0x19, 0x0800);
14079                 MP_WritePhyUshort(sc, 0x18, 0x1af4);
14080                 MP_WritePhyUshort(sc, 0x19, 0xc400);
14081                 MP_WritePhyUshort(sc, 0x18, 0x1b04);
14082                 MP_WritePhyUshort(sc, 0x19, 0x4000);
14083                 MP_WritePhyUshort(sc, 0x18, 0x1b14);
14084                 MP_WritePhyUshort(sc, 0x19, 0x0800);
14085                 MP_WritePhyUshort(sc, 0x18, 0x1b24);
14086                 MP_WritePhyUshort(sc, 0x19, 0xfd00);
14087                 MP_WritePhyUshort(sc, 0x18, 0x1b34);
14088                 MP_WritePhyUshort(sc, 0x19, 0x4000);
14089                 MP_WritePhyUshort(sc, 0x18, 0x1b44);
14090                 MP_WritePhyUshort(sc, 0x19, 0x0400);
14091                 MP_WritePhyUshort(sc, 0x18, 0x1b94);
14092                 MP_WritePhyUshort(sc, 0x19, 0xf100);
14093                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14094                 MP_WritePhyUshort(sc, 0x17, 0x2100);
14095                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
14096                 MP_WritePhyUshort(sc, 0x1e, 0x0040);
14097                 MP_WritePhyUshort(sc, 0x18, 0x0000);
14098                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14099                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
14100                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
14101                 MP_WritePhyUshort(sc, 0x06, 0x0080);
14102                 MP_WritePhyUshort(sc, 0x05, 0x8000);
14103                 MP_WritePhyUshort(sc, 0x06, 0x0280);
14104                 MP_WritePhyUshort(sc, 0x06, 0x48f7);
14105                 MP_WritePhyUshort(sc, 0x06, 0x00e0);
14106                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
14107                 MP_WritePhyUshort(sc, 0x06, 0xa080);
14108                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
14109                 MP_WritePhyUshort(sc, 0x06, 0xf602);
14110                 MP_WritePhyUshort(sc, 0x06, 0x0115);
14111                 MP_WritePhyUshort(sc, 0x06, 0x0201);
14112                 MP_WritePhyUshort(sc, 0x06, 0x2202);
14113                 MP_WritePhyUshort(sc, 0x06, 0x80a0);
14114                 MP_WritePhyUshort(sc, 0x06, 0x0201);
14115                 MP_WritePhyUshort(sc, 0x06, 0x3f02);
14116                 MP_WritePhyUshort(sc, 0x06, 0x0159);
14117                 MP_WritePhyUshort(sc, 0x06, 0x0280);
14118                 MP_WritePhyUshort(sc, 0x06, 0xbd02);
14119                 MP_WritePhyUshort(sc, 0x06, 0x80da);
14120                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14121                 MP_WritePhyUshort(sc, 0x06, 0x88e1);
14122                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
14123                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
14124                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
14125                 MP_WritePhyUshort(sc, 0x06, 0x8a1e);
14126                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
14127                 MP_WritePhyUshort(sc, 0x06, 0x8b8b);
14128                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
14129                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
14130                 MP_WritePhyUshort(sc, 0x06, 0x8c1e);
14131                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
14132                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
14133                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
14134                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
14135                 MP_WritePhyUshort(sc, 0x06, 0x8e1e);
14136                 MP_WritePhyUshort(sc, 0x06, 0x01a0);
14137                 MP_WritePhyUshort(sc, 0x06, 0x00c7);
14138                 MP_WritePhyUshort(sc, 0x06, 0xaebb);
14139                 MP_WritePhyUshort(sc, 0x06, 0xd481);
14140                 MP_WritePhyUshort(sc, 0x06, 0xd2e4);
14141                 MP_WritePhyUshort(sc, 0x06, 0x8b92);
14142                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
14143                 MP_WritePhyUshort(sc, 0x06, 0x93d1);
14144                 MP_WritePhyUshort(sc, 0x06, 0x03bf);
14145                 MP_WritePhyUshort(sc, 0x06, 0x859e);
14146                 MP_WritePhyUshort(sc, 0x06, 0x0237);
14147                 MP_WritePhyUshort(sc, 0x06, 0x23d1);
14148                 MP_WritePhyUshort(sc, 0x06, 0x02bf);
14149                 MP_WritePhyUshort(sc, 0x06, 0x85a1);
14150                 MP_WritePhyUshort(sc, 0x06, 0x0237);
14151                 MP_WritePhyUshort(sc, 0x06, 0x23ee);
14152                 MP_WritePhyUshort(sc, 0x06, 0x8608);
14153                 MP_WritePhyUshort(sc, 0x06, 0x03ee);
14154                 MP_WritePhyUshort(sc, 0x06, 0x860a);
14155                 MP_WritePhyUshort(sc, 0x06, 0x60ee);
14156                 MP_WritePhyUshort(sc, 0x06, 0x8610);
14157                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
14158                 MP_WritePhyUshort(sc, 0x06, 0x8611);
14159                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
14160                 MP_WritePhyUshort(sc, 0x06, 0x8abe);
14161                 MP_WritePhyUshort(sc, 0x06, 0x07ee);
14162                 MP_WritePhyUshort(sc, 0x06, 0x8abf);
14163                 MP_WritePhyUshort(sc, 0x06, 0x73ee);
14164                 MP_WritePhyUshort(sc, 0x06, 0x8a95);
14165                 MP_WritePhyUshort(sc, 0x06, 0x02bf);
14166                 MP_WritePhyUshort(sc, 0x06, 0x8b88);
14167                 MP_WritePhyUshort(sc, 0x06, 0xec00);
14168                 MP_WritePhyUshort(sc, 0x06, 0x19a9);
14169                 MP_WritePhyUshort(sc, 0x06, 0x8b90);
14170                 MP_WritePhyUshort(sc, 0x06, 0xf9ee);
14171                 MP_WritePhyUshort(sc, 0x06, 0xfff6);
14172                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
14173                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
14174                 MP_WritePhyUshort(sc, 0x06, 0xfed1);
14175                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
14176                 MP_WritePhyUshort(sc, 0x06, 0x8595);
14177                 MP_WritePhyUshort(sc, 0x06, 0x0237);
14178                 MP_WritePhyUshort(sc, 0x06, 0x23d1);
14179                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
14180                 MP_WritePhyUshort(sc, 0x06, 0x8598);
14181                 MP_WritePhyUshort(sc, 0x06, 0x0237);
14182                 MP_WritePhyUshort(sc, 0x06, 0x2304);
14183                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
14184                 MP_WritePhyUshort(sc, 0x06, 0x8b8a);
14185                 MP_WritePhyUshort(sc, 0x06, 0xad20);
14186                 MP_WritePhyUshort(sc, 0x06, 0x14ee);
14187                 MP_WritePhyUshort(sc, 0x06, 0x8b8a);
14188                 MP_WritePhyUshort(sc, 0x06, 0x0002);
14189                 MP_WritePhyUshort(sc, 0x06, 0x1f9a);
14190                 MP_WritePhyUshort(sc, 0x06, 0xe0e4);
14191                 MP_WritePhyUshort(sc, 0x06, 0x26e1);
14192                 MP_WritePhyUshort(sc, 0x06, 0xe427);
14193                 MP_WritePhyUshort(sc, 0x06, 0xeee4);
14194                 MP_WritePhyUshort(sc, 0x06, 0x2623);
14195                 MP_WritePhyUshort(sc, 0x06, 0xe5e4);
14196                 MP_WritePhyUshort(sc, 0x06, 0x27fc);
14197                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
14198                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14199                 MP_WritePhyUshort(sc, 0x06, 0x8dad);
14200                 MP_WritePhyUshort(sc, 0x06, 0x2014);
14201                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
14202                 MP_WritePhyUshort(sc, 0x06, 0x8d00);
14203                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
14204                 MP_WritePhyUshort(sc, 0x06, 0x5a78);
14205                 MP_WritePhyUshort(sc, 0x06, 0x039e);
14206                 MP_WritePhyUshort(sc, 0x06, 0x0902);
14207                 MP_WritePhyUshort(sc, 0x06, 0x05db);
14208                 MP_WritePhyUshort(sc, 0x06, 0x0282);
14209                 MP_WritePhyUshort(sc, 0x06, 0x7b02);
14210                 MP_WritePhyUshort(sc, 0x06, 0x3231);
14211                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14212                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
14213                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
14214                 MP_WritePhyUshort(sc, 0x06, 0xad20);
14215                 MP_WritePhyUshort(sc, 0x06, 0x1df6);
14216                 MP_WritePhyUshort(sc, 0x06, 0x20e4);
14217                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
14218                 MP_WritePhyUshort(sc, 0x06, 0x0281);
14219                 MP_WritePhyUshort(sc, 0x06, 0x5c02);
14220                 MP_WritePhyUshort(sc, 0x06, 0x2bcb);
14221                 MP_WritePhyUshort(sc, 0x06, 0x022d);
14222                 MP_WritePhyUshort(sc, 0x06, 0x2902);
14223                 MP_WritePhyUshort(sc, 0x06, 0x03b4);
14224                 MP_WritePhyUshort(sc, 0x06, 0x0285);
14225                 MP_WritePhyUshort(sc, 0x06, 0x6402);
14226                 MP_WritePhyUshort(sc, 0x06, 0x2eca);
14227                 MP_WritePhyUshort(sc, 0x06, 0x0284);
14228                 MP_WritePhyUshort(sc, 0x06, 0xcd02);
14229                 MP_WritePhyUshort(sc, 0x06, 0x046f);
14230                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14231                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
14232                 MP_WritePhyUshort(sc, 0x06, 0x210b);
14233                 MP_WritePhyUshort(sc, 0x06, 0xf621);
14234                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
14235                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
14236                 MP_WritePhyUshort(sc, 0x06, 0x8520);
14237                 MP_WritePhyUshort(sc, 0x06, 0x021b);
14238                 MP_WritePhyUshort(sc, 0x06, 0xe8e0);
14239                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
14240                 MP_WritePhyUshort(sc, 0x06, 0xad22);
14241                 MP_WritePhyUshort(sc, 0x06, 0x05f6);
14242                 MP_WritePhyUshort(sc, 0x06, 0x22e4);
14243                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
14244                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14245                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
14246                 MP_WritePhyUshort(sc, 0x06, 0x2308);
14247                 MP_WritePhyUshort(sc, 0x06, 0xf623);
14248                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
14249                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
14250                 MP_WritePhyUshort(sc, 0x06, 0x311c);
14251                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14252                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
14253                 MP_WritePhyUshort(sc, 0x06, 0x2405);
14254                 MP_WritePhyUshort(sc, 0x06, 0xf624);
14255                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
14256                 MP_WritePhyUshort(sc, 0x06, 0x8ee0);
14257                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
14258                 MP_WritePhyUshort(sc, 0x06, 0xad25);
14259                 MP_WritePhyUshort(sc, 0x06, 0x05f6);
14260                 MP_WritePhyUshort(sc, 0x06, 0x25e4);
14261                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
14262                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14263                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
14264                 MP_WritePhyUshort(sc, 0x06, 0x2608);
14265                 MP_WritePhyUshort(sc, 0x06, 0xf626);
14266                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
14267                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
14268                 MP_WritePhyUshort(sc, 0x06, 0x2df5);
14269                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14270                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
14271                 MP_WritePhyUshort(sc, 0x06, 0x2705);
14272                 MP_WritePhyUshort(sc, 0x06, 0xf627);
14273                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
14274                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
14275                 MP_WritePhyUshort(sc, 0x06, 0x037a);
14276                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14277                 MP_WritePhyUshort(sc, 0x06, 0xf8f9);
14278                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
14279                 MP_WritePhyUshort(sc, 0x06, 0x69e0);
14280                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
14281                 MP_WritePhyUshort(sc, 0x06, 0xad20);
14282                 MP_WritePhyUshort(sc, 0x06, 0x65d2);
14283                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
14284                 MP_WritePhyUshort(sc, 0x06, 0x2fe9);
14285                 MP_WritePhyUshort(sc, 0x06, 0x0236);
14286                 MP_WritePhyUshort(sc, 0x06, 0xf61e);
14287                 MP_WritePhyUshort(sc, 0x06, 0x21bf);
14288                 MP_WritePhyUshort(sc, 0x06, 0x2ff5);
14289                 MP_WritePhyUshort(sc, 0x06, 0x0236);
14290                 MP_WritePhyUshort(sc, 0x06, 0xf60c);
14291                 MP_WritePhyUshort(sc, 0x06, 0x111e);
14292                 MP_WritePhyUshort(sc, 0x06, 0x21bf);
14293                 MP_WritePhyUshort(sc, 0x06, 0x2ff8);
14294                 MP_WritePhyUshort(sc, 0x06, 0x0236);
14295                 MP_WritePhyUshort(sc, 0x06, 0xf60c);
14296                 MP_WritePhyUshort(sc, 0x06, 0x121e);
14297                 MP_WritePhyUshort(sc, 0x06, 0x21bf);
14298                 MP_WritePhyUshort(sc, 0x06, 0x2ffb);
14299                 MP_WritePhyUshort(sc, 0x06, 0x0236);
14300                 MP_WritePhyUshort(sc, 0x06, 0xf60c);
14301                 MP_WritePhyUshort(sc, 0x06, 0x131e);
14302                 MP_WritePhyUshort(sc, 0x06, 0x21bf);
14303                 MP_WritePhyUshort(sc, 0x06, 0x1f97);
14304                 MP_WritePhyUshort(sc, 0x06, 0x0236);
14305                 MP_WritePhyUshort(sc, 0x06, 0xf60c);
14306                 MP_WritePhyUshort(sc, 0x06, 0x141e);
14307                 MP_WritePhyUshort(sc, 0x06, 0x21bf);
14308                 MP_WritePhyUshort(sc, 0x06, 0x859b);
14309                 MP_WritePhyUshort(sc, 0x06, 0x0236);
14310                 MP_WritePhyUshort(sc, 0x06, 0xf60c);
14311                 MP_WritePhyUshort(sc, 0x06, 0x161e);
14312                 MP_WritePhyUshort(sc, 0x06, 0x21e0);
14313                 MP_WritePhyUshort(sc, 0x06, 0x8a8c);
14314                 MP_WritePhyUshort(sc, 0x06, 0x1f02);
14315                 MP_WritePhyUshort(sc, 0x06, 0x9e22);
14316                 MP_WritePhyUshort(sc, 0x06, 0xe68a);
14317                 MP_WritePhyUshort(sc, 0x06, 0x8cad);
14318                 MP_WritePhyUshort(sc, 0x06, 0x3114);
14319                 MP_WritePhyUshort(sc, 0x06, 0xad30);
14320                 MP_WritePhyUshort(sc, 0x06, 0x11ef);
14321                 MP_WritePhyUshort(sc, 0x06, 0x0258);
14322                 MP_WritePhyUshort(sc, 0x06, 0x0c9e);
14323                 MP_WritePhyUshort(sc, 0x06, 0x07ad);
14324                 MP_WritePhyUshort(sc, 0x06, 0x3608);
14325                 MP_WritePhyUshort(sc, 0x06, 0x5a30);
14326                 MP_WritePhyUshort(sc, 0x06, 0x9f04);
14327                 MP_WritePhyUshort(sc, 0x06, 0xd101);
14328                 MP_WritePhyUshort(sc, 0x06, 0xae02);
14329                 MP_WritePhyUshort(sc, 0x06, 0xd100);
14330                 MP_WritePhyUshort(sc, 0x06, 0xbf2f);
14331                 MP_WritePhyUshort(sc, 0x06, 0xf202);
14332                 MP_WritePhyUshort(sc, 0x06, 0x3723);
14333                 MP_WritePhyUshort(sc, 0x06, 0xef96);
14334                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
14335                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14336                 MP_WritePhyUshort(sc, 0x06, 0xf8f9);
14337                 MP_WritePhyUshort(sc, 0x06, 0xface);
14338                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
14339                 MP_WritePhyUshort(sc, 0x06, 0x69fa);
14340                 MP_WritePhyUshort(sc, 0x06, 0xd401);
14341                 MP_WritePhyUshort(sc, 0x06, 0x55b4);
14342                 MP_WritePhyUshort(sc, 0x06, 0xfebf);
14343                 MP_WritePhyUshort(sc, 0x06, 0x85a7);
14344                 MP_WritePhyUshort(sc, 0x06, 0x0236);
14345                 MP_WritePhyUshort(sc, 0x06, 0xf6ac);
14346                 MP_WritePhyUshort(sc, 0x06, 0x280b);
14347                 MP_WritePhyUshort(sc, 0x06, 0xbf85);
14348                 MP_WritePhyUshort(sc, 0x06, 0xa402);
14349                 MP_WritePhyUshort(sc, 0x06, 0x36f6);
14350                 MP_WritePhyUshort(sc, 0x06, 0xac28);
14351                 MP_WritePhyUshort(sc, 0x06, 0x49ae);
14352                 MP_WritePhyUshort(sc, 0x06, 0x64bf);
14353                 MP_WritePhyUshort(sc, 0x06, 0x85a4);
14354                 MP_WritePhyUshort(sc, 0x06, 0x0236);
14355                 MP_WritePhyUshort(sc, 0x06, 0xf6ac);
14356                 MP_WritePhyUshort(sc, 0x06, 0x285b);
14357                 MP_WritePhyUshort(sc, 0x06, 0xd000);
14358                 MP_WritePhyUshort(sc, 0x06, 0x0282);
14359                 MP_WritePhyUshort(sc, 0x06, 0x60ac);
14360                 MP_WritePhyUshort(sc, 0x06, 0x2105);
14361                 MP_WritePhyUshort(sc, 0x06, 0xac22);
14362                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
14363                 MP_WritePhyUshort(sc, 0x06, 0x4ebf);
14364                 MP_WritePhyUshort(sc, 0x06, 0xe0c4);
14365                 MP_WritePhyUshort(sc, 0x06, 0xbe86);
14366                 MP_WritePhyUshort(sc, 0x06, 0x14d2);
14367                 MP_WritePhyUshort(sc, 0x06, 0x04d8);
14368                 MP_WritePhyUshort(sc, 0x06, 0x19d9);
14369                 MP_WritePhyUshort(sc, 0x06, 0x1907);
14370                 MP_WritePhyUshort(sc, 0x06, 0xdc19);
14371                 MP_WritePhyUshort(sc, 0x06, 0xdd19);
14372                 MP_WritePhyUshort(sc, 0x06, 0x0789);
14373                 MP_WritePhyUshort(sc, 0x06, 0x89ef);
14374                 MP_WritePhyUshort(sc, 0x06, 0x645e);
14375                 MP_WritePhyUshort(sc, 0x06, 0x07ff);
14376                 MP_WritePhyUshort(sc, 0x06, 0x0d65);
14377                 MP_WritePhyUshort(sc, 0x06, 0x5cf8);
14378                 MP_WritePhyUshort(sc, 0x06, 0x001e);
14379                 MP_WritePhyUshort(sc, 0x06, 0x46dc);
14380                 MP_WritePhyUshort(sc, 0x06, 0x19dd);
14381                 MP_WritePhyUshort(sc, 0x06, 0x19b2);
14382                 MP_WritePhyUshort(sc, 0x06, 0xe2d4);
14383                 MP_WritePhyUshort(sc, 0x06, 0x0001);
14384                 MP_WritePhyUshort(sc, 0x06, 0xbf85);
14385                 MP_WritePhyUshort(sc, 0x06, 0xa402);
14386                 MP_WritePhyUshort(sc, 0x06, 0x3723);
14387                 MP_WritePhyUshort(sc, 0x06, 0xae1d);
14388                 MP_WritePhyUshort(sc, 0x06, 0xbee0);
14389                 MP_WritePhyUshort(sc, 0x06, 0xc4bf);
14390                 MP_WritePhyUshort(sc, 0x06, 0x8614);
14391                 MP_WritePhyUshort(sc, 0x06, 0xd204);
14392                 MP_WritePhyUshort(sc, 0x06, 0xd819);
14393                 MP_WritePhyUshort(sc, 0x06, 0xd919);
14394                 MP_WritePhyUshort(sc, 0x06, 0x07dc);
14395                 MP_WritePhyUshort(sc, 0x06, 0x19dd);
14396                 MP_WritePhyUshort(sc, 0x06, 0x1907);
14397                 MP_WritePhyUshort(sc, 0x06, 0xb2f4);
14398                 MP_WritePhyUshort(sc, 0x06, 0xd400);
14399                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
14400                 MP_WritePhyUshort(sc, 0x06, 0x85a4);
14401                 MP_WritePhyUshort(sc, 0x06, 0x0237);
14402                 MP_WritePhyUshort(sc, 0x06, 0x23fe);
14403                 MP_WritePhyUshort(sc, 0x06, 0xef96);
14404                 MP_WritePhyUshort(sc, 0x06, 0xfec6);
14405                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
14406                 MP_WritePhyUshort(sc, 0x06, 0xfc05);
14407                 MP_WritePhyUshort(sc, 0x06, 0xf9e2);
14408                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
14409                 MP_WritePhyUshort(sc, 0x06, 0xe3e0);
14410                 MP_WritePhyUshort(sc, 0x06, 0xeb5a);
14411                 MP_WritePhyUshort(sc, 0x06, 0x070c);
14412                 MP_WritePhyUshort(sc, 0x06, 0x031e);
14413                 MP_WritePhyUshort(sc, 0x06, 0x20e6);
14414                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
14415                 MP_WritePhyUshort(sc, 0x06, 0xe7e0);
14416                 MP_WritePhyUshort(sc, 0x06, 0xebe0);
14417                 MP_WritePhyUshort(sc, 0x06, 0xe0fc);
14418                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
14419                 MP_WritePhyUshort(sc, 0x06, 0xfdfd);
14420                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
14421                 MP_WritePhyUshort(sc, 0x06, 0xf9e0);
14422                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
14423                 MP_WritePhyUshort(sc, 0x06, 0xac26);
14424                 MP_WritePhyUshort(sc, 0x06, 0x1ae0);
14425                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
14426                 MP_WritePhyUshort(sc, 0x06, 0xac21);
14427                 MP_WritePhyUshort(sc, 0x06, 0x14e0);
14428                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
14429                 MP_WritePhyUshort(sc, 0x06, 0xac20);
14430                 MP_WritePhyUshort(sc, 0x06, 0x0ee0);
14431                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
14432                 MP_WritePhyUshort(sc, 0x06, 0xac23);
14433                 MP_WritePhyUshort(sc, 0x06, 0x08e0);
14434                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
14435                 MP_WritePhyUshort(sc, 0x06, 0xac24);
14436                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
14437                 MP_WritePhyUshort(sc, 0x06, 0x3802);
14438                 MP_WritePhyUshort(sc, 0x06, 0x1ab5);
14439                 MP_WritePhyUshort(sc, 0x06, 0xeee4);
14440                 MP_WritePhyUshort(sc, 0x06, 0x1c04);
14441                 MP_WritePhyUshort(sc, 0x06, 0xeee4);
14442                 MP_WritePhyUshort(sc, 0x06, 0x1d04);
14443                 MP_WritePhyUshort(sc, 0x06, 0xe2e0);
14444                 MP_WritePhyUshort(sc, 0x06, 0x7ce3);
14445                 MP_WritePhyUshort(sc, 0x06, 0xe07d);
14446                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
14447                 MP_WritePhyUshort(sc, 0x06, 0x38e1);
14448                 MP_WritePhyUshort(sc, 0x06, 0xe039);
14449                 MP_WritePhyUshort(sc, 0x06, 0xad2e);
14450                 MP_WritePhyUshort(sc, 0x06, 0x1bad);
14451                 MP_WritePhyUshort(sc, 0x06, 0x390d);
14452                 MP_WritePhyUshort(sc, 0x06, 0xd101);
14453                 MP_WritePhyUshort(sc, 0x06, 0xbf21);
14454                 MP_WritePhyUshort(sc, 0x06, 0xd502);
14455                 MP_WritePhyUshort(sc, 0x06, 0x3723);
14456                 MP_WritePhyUshort(sc, 0x06, 0x0282);
14457                 MP_WritePhyUshort(sc, 0x06, 0xd8ae);
14458                 MP_WritePhyUshort(sc, 0x06, 0x0bac);
14459                 MP_WritePhyUshort(sc, 0x06, 0x3802);
14460                 MP_WritePhyUshort(sc, 0x06, 0xae06);
14461                 MP_WritePhyUshort(sc, 0x06, 0x0283);
14462                 MP_WritePhyUshort(sc, 0x06, 0x1802);
14463                 MP_WritePhyUshort(sc, 0x06, 0x8360);
14464                 MP_WritePhyUshort(sc, 0x06, 0x021a);
14465                 MP_WritePhyUshort(sc, 0x06, 0xc6fd);
14466                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14467                 MP_WritePhyUshort(sc, 0x06, 0xf8e1);
14468                 MP_WritePhyUshort(sc, 0x06, 0x8af4);
14469                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14470                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
14471                 MP_WritePhyUshort(sc, 0x06, 0x2605);
14472                 MP_WritePhyUshort(sc, 0x06, 0x0222);
14473                 MP_WritePhyUshort(sc, 0x06, 0xa4f7);
14474                 MP_WritePhyUshort(sc, 0x06, 0x28e0);
14475                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
14476                 MP_WritePhyUshort(sc, 0x06, 0xad21);
14477                 MP_WritePhyUshort(sc, 0x06, 0x0502);
14478                 MP_WritePhyUshort(sc, 0x06, 0x23a9);
14479                 MP_WritePhyUshort(sc, 0x06, 0xf729);
14480                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14481                 MP_WritePhyUshort(sc, 0x06, 0x85ad);
14482                 MP_WritePhyUshort(sc, 0x06, 0x2005);
14483                 MP_WritePhyUshort(sc, 0x06, 0x0214);
14484                 MP_WritePhyUshort(sc, 0x06, 0xabf7);
14485                 MP_WritePhyUshort(sc, 0x06, 0x2ae0);
14486                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
14487                 MP_WritePhyUshort(sc, 0x06, 0xad23);
14488                 MP_WritePhyUshort(sc, 0x06, 0x0502);
14489                 MP_WritePhyUshort(sc, 0x06, 0x12e7);
14490                 MP_WritePhyUshort(sc, 0x06, 0xf72b);
14491                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14492                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
14493                 MP_WritePhyUshort(sc, 0x06, 0x2405);
14494                 MP_WritePhyUshort(sc, 0x06, 0x0283);
14495                 MP_WritePhyUshort(sc, 0x06, 0xbcf7);
14496                 MP_WritePhyUshort(sc, 0x06, 0x2ce5);
14497                 MP_WritePhyUshort(sc, 0x06, 0x8af4);
14498                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14499                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
14500                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
14501                 MP_WritePhyUshort(sc, 0x06, 0xad26);
14502                 MP_WritePhyUshort(sc, 0x06, 0x0302);
14503                 MP_WritePhyUshort(sc, 0x06, 0x21e5);
14504                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14505                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
14506                 MP_WritePhyUshort(sc, 0x06, 0x2109);
14507                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
14508                 MP_WritePhyUshort(sc, 0x06, 0xf4ac);
14509                 MP_WritePhyUshort(sc, 0x06, 0x2003);
14510                 MP_WritePhyUshort(sc, 0x06, 0x0223);
14511                 MP_WritePhyUshort(sc, 0x06, 0x98e0);
14512                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
14513                 MP_WritePhyUshort(sc, 0x06, 0xad20);
14514                 MP_WritePhyUshort(sc, 0x06, 0x09e0);
14515                 MP_WritePhyUshort(sc, 0x06, 0x8af4);
14516                 MP_WritePhyUshort(sc, 0x06, 0xac21);
14517                 MP_WritePhyUshort(sc, 0x06, 0x0302);
14518                 MP_WritePhyUshort(sc, 0x06, 0x13fb);
14519                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14520                 MP_WritePhyUshort(sc, 0x06, 0x85ad);
14521                 MP_WritePhyUshort(sc, 0x06, 0x2309);
14522                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
14523                 MP_WritePhyUshort(sc, 0x06, 0xf4ac);
14524                 MP_WritePhyUshort(sc, 0x06, 0x2203);
14525                 MP_WritePhyUshort(sc, 0x06, 0x0212);
14526                 MP_WritePhyUshort(sc, 0x06, 0xfae0);
14527                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
14528                 MP_WritePhyUshort(sc, 0x06, 0xad24);
14529                 MP_WritePhyUshort(sc, 0x06, 0x09e0);
14530                 MP_WritePhyUshort(sc, 0x06, 0x8af4);
14531                 MP_WritePhyUshort(sc, 0x06, 0xac23);
14532                 MP_WritePhyUshort(sc, 0x06, 0x0302);
14533                 MP_WritePhyUshort(sc, 0x06, 0x83c1);
14534                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14535                 MP_WritePhyUshort(sc, 0x06, 0xf8e1);
14536                 MP_WritePhyUshort(sc, 0x06, 0x8af4);
14537                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14538                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
14539                 MP_WritePhyUshort(sc, 0x06, 0x2608);
14540                 MP_WritePhyUshort(sc, 0x06, 0xe083);
14541                 MP_WritePhyUshort(sc, 0x06, 0xd2ad);
14542                 MP_WritePhyUshort(sc, 0x06, 0x2502);
14543                 MP_WritePhyUshort(sc, 0x06, 0xf628);
14544                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14545                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
14546                 MP_WritePhyUshort(sc, 0x06, 0x210a);
14547                 MP_WritePhyUshort(sc, 0x06, 0xe084);
14548                 MP_WritePhyUshort(sc, 0x06, 0x0af6);
14549                 MP_WritePhyUshort(sc, 0x06, 0x27a0);
14550                 MP_WritePhyUshort(sc, 0x06, 0x0502);
14551                 MP_WritePhyUshort(sc, 0x06, 0xf629);
14552                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14553                 MP_WritePhyUshort(sc, 0x06, 0x85ad);
14554                 MP_WritePhyUshort(sc, 0x06, 0x2008);
14555                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
14556                 MP_WritePhyUshort(sc, 0x06, 0xe8ad);
14557                 MP_WritePhyUshort(sc, 0x06, 0x2102);
14558                 MP_WritePhyUshort(sc, 0x06, 0xf62a);
14559                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14560                 MP_WritePhyUshort(sc, 0x06, 0x85ad);
14561                 MP_WritePhyUshort(sc, 0x06, 0x2308);
14562                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14563                 MP_WritePhyUshort(sc, 0x06, 0x20a0);
14564                 MP_WritePhyUshort(sc, 0x06, 0x0302);
14565                 MP_WritePhyUshort(sc, 0x06, 0xf62b);
14566                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14567                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
14568                 MP_WritePhyUshort(sc, 0x06, 0x2408);
14569                 MP_WritePhyUshort(sc, 0x06, 0xe086);
14570                 MP_WritePhyUshort(sc, 0x06, 0x02a0);
14571                 MP_WritePhyUshort(sc, 0x06, 0x0302);
14572                 MP_WritePhyUshort(sc, 0x06, 0xf62c);
14573                 MP_WritePhyUshort(sc, 0x06, 0xe58a);
14574                 MP_WritePhyUshort(sc, 0x06, 0xf4a1);
14575                 MP_WritePhyUshort(sc, 0x06, 0x0008);
14576                 MP_WritePhyUshort(sc, 0x06, 0xd100);
14577                 MP_WritePhyUshort(sc, 0x06, 0xbf21);
14578                 MP_WritePhyUshort(sc, 0x06, 0xd502);
14579                 MP_WritePhyUshort(sc, 0x06, 0x3723);
14580                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14581                 MP_WritePhyUshort(sc, 0x06, 0xee86);
14582                 MP_WritePhyUshort(sc, 0x06, 0x0200);
14583                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
14584                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14585                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
14586                 MP_WritePhyUshort(sc, 0x06, 0x241e);
14587                 MP_WritePhyUshort(sc, 0x06, 0xe086);
14588                 MP_WritePhyUshort(sc, 0x06, 0x02a0);
14589                 MP_WritePhyUshort(sc, 0x06, 0x0005);
14590                 MP_WritePhyUshort(sc, 0x06, 0x0283);
14591                 MP_WritePhyUshort(sc, 0x06, 0xe8ae);
14592                 MP_WritePhyUshort(sc, 0x06, 0xf5a0);
14593                 MP_WritePhyUshort(sc, 0x06, 0x0105);
14594                 MP_WritePhyUshort(sc, 0x06, 0x0283);
14595                 MP_WritePhyUshort(sc, 0x06, 0xf8ae);
14596                 MP_WritePhyUshort(sc, 0x06, 0x0ba0);
14597                 MP_WritePhyUshort(sc, 0x06, 0x0205);
14598                 MP_WritePhyUshort(sc, 0x06, 0x0284);
14599                 MP_WritePhyUshort(sc, 0x06, 0x14ae);
14600                 MP_WritePhyUshort(sc, 0x06, 0x03a0);
14601                 MP_WritePhyUshort(sc, 0x06, 0x0300);
14602                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14603                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
14604                 MP_WritePhyUshort(sc, 0x06, 0xef69);
14605                 MP_WritePhyUshort(sc, 0x06, 0x0284);
14606                 MP_WritePhyUshort(sc, 0x06, 0x2bee);
14607                 MP_WritePhyUshort(sc, 0x06, 0x8602);
14608                 MP_WritePhyUshort(sc, 0x06, 0x01ef);
14609                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
14610                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14611                 MP_WritePhyUshort(sc, 0x06, 0xf8ee);
14612                 MP_WritePhyUshort(sc, 0x06, 0x8609);
14613                 MP_WritePhyUshort(sc, 0x06, 0x0002);
14614                 MP_WritePhyUshort(sc, 0x06, 0x8461);
14615                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14616                 MP_WritePhyUshort(sc, 0x06, 0xae10);
14617                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14618                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14619                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14620                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14621                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14622                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14623                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14624                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14625                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
14626                 MP_WritePhyUshort(sc, 0x06, 0x8608);
14627                 MP_WritePhyUshort(sc, 0x06, 0xe186);
14628                 MP_WritePhyUshort(sc, 0x06, 0x091f);
14629                 MP_WritePhyUshort(sc, 0x06, 0x019e);
14630                 MP_WritePhyUshort(sc, 0x06, 0x0611);
14631                 MP_WritePhyUshort(sc, 0x06, 0xe586);
14632                 MP_WritePhyUshort(sc, 0x06, 0x09ae);
14633                 MP_WritePhyUshort(sc, 0x06, 0x04ee);
14634                 MP_WritePhyUshort(sc, 0x06, 0x8602);
14635                 MP_WritePhyUshort(sc, 0x06, 0x01fc);
14636                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
14637                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
14638                 MP_WritePhyUshort(sc, 0x06, 0xef69);
14639                 MP_WritePhyUshort(sc, 0x06, 0xfbbf);
14640                 MP_WritePhyUshort(sc, 0x06, 0x8604);
14641                 MP_WritePhyUshort(sc, 0x06, 0xef79);
14642                 MP_WritePhyUshort(sc, 0x06, 0xd200);
14643                 MP_WritePhyUshort(sc, 0x06, 0xd400);
14644                 MP_WritePhyUshort(sc, 0x06, 0x221e);
14645                 MP_WritePhyUshort(sc, 0x06, 0x02bf);
14646                 MP_WritePhyUshort(sc, 0x06, 0x2fec);
14647                 MP_WritePhyUshort(sc, 0x06, 0x0237);
14648                 MP_WritePhyUshort(sc, 0x06, 0x23bf);
14649                 MP_WritePhyUshort(sc, 0x06, 0x13f2);
14650                 MP_WritePhyUshort(sc, 0x06, 0x0236);
14651                 MP_WritePhyUshort(sc, 0x06, 0xf60d);
14652                 MP_WritePhyUshort(sc, 0x06, 0x4559);
14653                 MP_WritePhyUshort(sc, 0x06, 0x1fef);
14654                 MP_WritePhyUshort(sc, 0x06, 0x97dd);
14655                 MP_WritePhyUshort(sc, 0x06, 0xd308);
14656                 MP_WritePhyUshort(sc, 0x06, 0x1a93);
14657                 MP_WritePhyUshort(sc, 0x06, 0xdd12);
14658                 MP_WritePhyUshort(sc, 0x06, 0x17a2);
14659                 MP_WritePhyUshort(sc, 0x06, 0x04de);
14660                 MP_WritePhyUshort(sc, 0x06, 0xffef);
14661                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
14662                 MP_WritePhyUshort(sc, 0x06, 0xfdfc);
14663                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
14664                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
14665                 MP_WritePhyUshort(sc, 0x06, 0xef69);
14666                 MP_WritePhyUshort(sc, 0x06, 0xfbee);
14667                 MP_WritePhyUshort(sc, 0x06, 0x8602);
14668                 MP_WritePhyUshort(sc, 0x06, 0x03d5);
14669                 MP_WritePhyUshort(sc, 0x06, 0x0080);
14670                 MP_WritePhyUshort(sc, 0x06, 0xbf86);
14671                 MP_WritePhyUshort(sc, 0x06, 0x04ef);
14672                 MP_WritePhyUshort(sc, 0x06, 0x79ef);
14673                 MP_WritePhyUshort(sc, 0x06, 0x45bf);
14674                 MP_WritePhyUshort(sc, 0x06, 0x2fec);
14675                 MP_WritePhyUshort(sc, 0x06, 0x0237);
14676                 MP_WritePhyUshort(sc, 0x06, 0x23bf);
14677                 MP_WritePhyUshort(sc, 0x06, 0x13f2);
14678                 MP_WritePhyUshort(sc, 0x06, 0x0236);
14679                 MP_WritePhyUshort(sc, 0x06, 0xf6ad);
14680                 MP_WritePhyUshort(sc, 0x06, 0x2702);
14681                 MP_WritePhyUshort(sc, 0x06, 0x78ff);
14682                 MP_WritePhyUshort(sc, 0x06, 0xe186);
14683                 MP_WritePhyUshort(sc, 0x06, 0x0a1b);
14684                 MP_WritePhyUshort(sc, 0x06, 0x01aa);
14685                 MP_WritePhyUshort(sc, 0x06, 0x2eef);
14686                 MP_WritePhyUshort(sc, 0x06, 0x97d9);
14687                 MP_WritePhyUshort(sc, 0x06, 0x7900);
14688                 MP_WritePhyUshort(sc, 0x06, 0x9e2b);
14689                 MP_WritePhyUshort(sc, 0x06, 0x81dd);
14690                 MP_WritePhyUshort(sc, 0x06, 0xbf85);
14691                 MP_WritePhyUshort(sc, 0x06, 0xad02);
14692                 MP_WritePhyUshort(sc, 0x06, 0x3723);
14693                 MP_WritePhyUshort(sc, 0x06, 0xd101);
14694                 MP_WritePhyUshort(sc, 0x06, 0xef02);
14695                 MP_WritePhyUshort(sc, 0x06, 0x100c);
14696                 MP_WritePhyUshort(sc, 0x06, 0x11b0);
14697                 MP_WritePhyUshort(sc, 0x06, 0xfc0d);
14698                 MP_WritePhyUshort(sc, 0x06, 0x11bf);
14699                 MP_WritePhyUshort(sc, 0x06, 0x85aa);
14700                 MP_WritePhyUshort(sc, 0x06, 0x0237);
14701                 MP_WritePhyUshort(sc, 0x06, 0x23d1);
14702                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
14703                 MP_WritePhyUshort(sc, 0x06, 0x85aa);
14704                 MP_WritePhyUshort(sc, 0x06, 0x0237);
14705                 MP_WritePhyUshort(sc, 0x06, 0x23ee);
14706                 MP_WritePhyUshort(sc, 0x06, 0x8602);
14707                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
14708                 MP_WritePhyUshort(sc, 0x06, 0x0413);
14709                 MP_WritePhyUshort(sc, 0x06, 0xa38b);
14710                 MP_WritePhyUshort(sc, 0x06, 0xb4d3);
14711                 MP_WritePhyUshort(sc, 0x06, 0x8012);
14712                 MP_WritePhyUshort(sc, 0x06, 0x17a2);
14713                 MP_WritePhyUshort(sc, 0x06, 0x04ad);
14714                 MP_WritePhyUshort(sc, 0x06, 0xffef);
14715                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
14716                 MP_WritePhyUshort(sc, 0x06, 0xfdfc);
14717                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
14718                 MP_WritePhyUshort(sc, 0x06, 0xf9e0);
14719                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
14720                 MP_WritePhyUshort(sc, 0x06, 0xad25);
14721                 MP_WritePhyUshort(sc, 0x06, 0x48e0);
14722                 MP_WritePhyUshort(sc, 0x06, 0x8a96);
14723                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
14724                 MP_WritePhyUshort(sc, 0x06, 0x977c);
14725                 MP_WritePhyUshort(sc, 0x06, 0x0000);
14726                 MP_WritePhyUshort(sc, 0x06, 0x9e35);
14727                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
14728                 MP_WritePhyUshort(sc, 0x06, 0x9600);
14729                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
14730                 MP_WritePhyUshort(sc, 0x06, 0x9700);
14731                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
14732                 MP_WritePhyUshort(sc, 0x06, 0xbee1);
14733                 MP_WritePhyUshort(sc, 0x06, 0x8abf);
14734                 MP_WritePhyUshort(sc, 0x06, 0xe286);
14735                 MP_WritePhyUshort(sc, 0x06, 0x10e3);
14736                 MP_WritePhyUshort(sc, 0x06, 0x8611);
14737                 MP_WritePhyUshort(sc, 0x06, 0x0236);
14738                 MP_WritePhyUshort(sc, 0x06, 0x1aad);
14739                 MP_WritePhyUshort(sc, 0x06, 0x2012);
14740                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
14741                 MP_WritePhyUshort(sc, 0x06, 0x9603);
14742                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
14743                 MP_WritePhyUshort(sc, 0x06, 0x97b7);
14744                 MP_WritePhyUshort(sc, 0x06, 0xee86);
14745                 MP_WritePhyUshort(sc, 0x06, 0x1000);
14746                 MP_WritePhyUshort(sc, 0x06, 0xee86);
14747                 MP_WritePhyUshort(sc, 0x06, 0x1100);
14748                 MP_WritePhyUshort(sc, 0x06, 0xae11);
14749                 MP_WritePhyUshort(sc, 0x06, 0x15e6);
14750                 MP_WritePhyUshort(sc, 0x06, 0x8610);
14751                 MP_WritePhyUshort(sc, 0x06, 0xe786);
14752                 MP_WritePhyUshort(sc, 0x06, 0x11ae);
14753                 MP_WritePhyUshort(sc, 0x06, 0x08ee);
14754                 MP_WritePhyUshort(sc, 0x06, 0x8610);
14755                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
14756                 MP_WritePhyUshort(sc, 0x06, 0x8611);
14757                 MP_WritePhyUshort(sc, 0x06, 0x00fd);
14758                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14759                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
14760                 MP_WritePhyUshort(sc, 0x06, 0xef69);
14761                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
14762                 MP_WritePhyUshort(sc, 0x06, 0x00e1);
14763                 MP_WritePhyUshort(sc, 0x06, 0xe001);
14764                 MP_WritePhyUshort(sc, 0x06, 0xad27);
14765                 MP_WritePhyUshort(sc, 0x06, 0x32e0);
14766                 MP_WritePhyUshort(sc, 0x06, 0x8b40);
14767                 MP_WritePhyUshort(sc, 0x06, 0xf720);
14768                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
14769                 MP_WritePhyUshort(sc, 0x06, 0x40bf);
14770                 MP_WritePhyUshort(sc, 0x06, 0x31f5);
14771                 MP_WritePhyUshort(sc, 0x06, 0x0236);
14772                 MP_WritePhyUshort(sc, 0x06, 0xf6ad);
14773                 MP_WritePhyUshort(sc, 0x06, 0x2821);
14774                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
14775                 MP_WritePhyUshort(sc, 0x06, 0x20e1);
14776                 MP_WritePhyUshort(sc, 0x06, 0xe021);
14777                 MP_WritePhyUshort(sc, 0x06, 0xad20);
14778                 MP_WritePhyUshort(sc, 0x06, 0x18e0);
14779                 MP_WritePhyUshort(sc, 0x06, 0x8b40);
14780                 MP_WritePhyUshort(sc, 0x06, 0xf620);
14781                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
14782                 MP_WritePhyUshort(sc, 0x06, 0x40ee);
14783                 MP_WritePhyUshort(sc, 0x06, 0x8b3b);
14784                 MP_WritePhyUshort(sc, 0x06, 0xffe0);
14785                 MP_WritePhyUshort(sc, 0x06, 0x8a8a);
14786                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
14787                 MP_WritePhyUshort(sc, 0x06, 0x8be4);
14788                 MP_WritePhyUshort(sc, 0x06, 0xe000);
14789                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
14790                 MP_WritePhyUshort(sc, 0x06, 0x01ef);
14791                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
14792                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
14793                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
14794                 MP_WritePhyUshort(sc, 0x06, 0xef69);
14795                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14796                 MP_WritePhyUshort(sc, 0x06, 0x80ad);
14797                 MP_WritePhyUshort(sc, 0x06, 0x2722);
14798                 MP_WritePhyUshort(sc, 0x06, 0xbf44);
14799                 MP_WritePhyUshort(sc, 0x06, 0xfc02);
14800                 MP_WritePhyUshort(sc, 0x06, 0x36f6);
14801                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
14802                 MP_WritePhyUshort(sc, 0x06, 0x441f);
14803                 MP_WritePhyUshort(sc, 0x06, 0x019e);
14804                 MP_WritePhyUshort(sc, 0x06, 0x15e5);
14805                 MP_WritePhyUshort(sc, 0x06, 0x8b44);
14806                 MP_WritePhyUshort(sc, 0x06, 0xad29);
14807                 MP_WritePhyUshort(sc, 0x06, 0x07ac);
14808                 MP_WritePhyUshort(sc, 0x06, 0x2804);
14809                 MP_WritePhyUshort(sc, 0x06, 0xd101);
14810                 MP_WritePhyUshort(sc, 0x06, 0xae02);
14811                 MP_WritePhyUshort(sc, 0x06, 0xd100);
14812                 MP_WritePhyUshort(sc, 0x06, 0xbf85);
14813                 MP_WritePhyUshort(sc, 0x06, 0xb002);
14814                 MP_WritePhyUshort(sc, 0x06, 0x3723);
14815                 MP_WritePhyUshort(sc, 0x06, 0xef96);
14816                 MP_WritePhyUshort(sc, 0x06, 0xfefc);
14817                 MP_WritePhyUshort(sc, 0x06, 0x0400);
14818                 MP_WritePhyUshort(sc, 0x06, 0xe140);
14819                 MP_WritePhyUshort(sc, 0x06, 0x77e1);
14820                 MP_WritePhyUshort(sc, 0x06, 0x40dd);
14821                 MP_WritePhyUshort(sc, 0x06, 0xe022);
14822                 MP_WritePhyUshort(sc, 0x06, 0x32e1);
14823                 MP_WritePhyUshort(sc, 0x06, 0x5074);
14824                 MP_WritePhyUshort(sc, 0x06, 0xe144);
14825                 MP_WritePhyUshort(sc, 0x06, 0xffe0);
14826                 MP_WritePhyUshort(sc, 0x06, 0xdaff);
14827                 MP_WritePhyUshort(sc, 0x06, 0xe0c0);
14828                 MP_WritePhyUshort(sc, 0x06, 0x52e0);
14829                 MP_WritePhyUshort(sc, 0x06, 0xeed9);
14830                 MP_WritePhyUshort(sc, 0x06, 0xe04c);
14831                 MP_WritePhyUshort(sc, 0x06, 0xbbe0);
14832                 MP_WritePhyUshort(sc, 0x06, 0x2a00);
14833                 MP_WritePhyUshort(sc, 0x05, 0xe142);
14834                 Data = MP_ReadPhyUshort(sc, 0x06);
14835                 Data |= BIT_0;
14836                 MP_WritePhyUshort(sc, 0x06, Data);
14837                 MP_WritePhyUshort(sc, 0x05, 0xe140);
14838                 Data = MP_ReadPhyUshort(sc, 0x06);
14839                 Data |= BIT_0;
14840                 MP_WritePhyUshort(sc, 0x06, Data);
14841                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14842                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
14843                 for (i = 0; i < 200; i++) {
14844                         DELAY(100);
14845                         Data = MP_ReadPhyUshort(sc, 0x00);
14846                         if (Data & BIT_7)
14847                                 break;
14848                 }
14849                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
14850                 MP_WritePhyUshort(sc, 0x1e, 0x0042);
14851                 MP_WritePhyUshort(sc, 0x18, 0x2300);
14852                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14853                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
14854                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
14855                 Data = MP_ReadPhyUshort(sc, 0x17);
14856                 MP_WritePhyUshort(sc, 0x17, Data);
14857
14858                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
14859                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
14860                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
14861                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14862                 MP_WritePhyUshort(sc, 0x00, 0x9200);
14863
14864                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
14865                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
14866                 Data = MP_ReadPhyUshort(sc, 0x06);
14867                 Data |= BIT_2 | BIT_1;
14868                 MP_WritePhyUshort(sc, 0x06, Data);
14869                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14870
14871                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
14872                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
14873                 Data = MP_ReadPhyUshort(sc, 0x06);
14874                 Data |= BIT_15;
14875                 MP_WritePhyUshort(sc, 0x06, Data);
14876                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14877
14878                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
14879                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
14880                 MP_WritePhyUshort(sc, 0x1e, 0x002D);
14881                 Data = MP_ReadPhyUshort(sc, 0x18);
14882                 Data |= BIT_4;
14883                 MP_WritePhyUshort(sc, 0x18, Data);
14884                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
14885                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14886                 Data = MP_ReadPhyUshort(sc, 0x14);
14887                 Data |= BIT_15;
14888                 MP_WritePhyUshort(sc, 0x14, Data);
14889
14890                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
14891                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
14892                 Data = MP_ReadPhyUshort(sc, 0x06);
14893                 Data |= BIT_0;
14894                 MP_WritePhyUshort(sc, 0x06, Data);
14895                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14896
14897                 MP_WritePhyUshort(sc, 0x1F, 0x0004);
14898                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
14899                 MP_WritePhyUshort(sc, 0x1E, 0x00AC);
14900                 MP_WritePhyUshort(sc, 0x18, 0x0006);
14901                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
14902                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
14903
14904                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
14905                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
14906                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
14907
14908                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
14909                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
14910                 Data = MP_ReadPhyUshort(sc, 0x06);
14911                 Data |= BIT_14;
14912                 MP_WritePhyUshort(sc, 0x06, Data);
14913                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14914
14915                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
14916                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
14917                 Data = MP_ReadPhyUshort(sc, 0x06);
14918                 Data &= ~BIT_11;
14919                 MP_WritePhyUshort(sc, 0x06, Data);
14920                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
14921                 Data = MP_ReadPhyUshort(sc, 0x06);
14922                 Data &= ~BIT_11;
14923                 MP_WritePhyUshort(sc, 0x06, Data);
14924                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
14925                 Data = MP_ReadPhyUshort(sc, 0x06);
14926                 Data &= ~BIT_8;
14927                 MP_WritePhyUshort(sc, 0x06, Data);
14928                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
14929                 Data = MP_ReadPhyUshort(sc, 0x06);
14930                 Data |= BIT_8;
14931                 MP_WritePhyUshort(sc, 0x06, Data);
14932                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
14933                 Data = MP_ReadPhyUshort(sc, 0x06);
14934                 Data &= ~BIT_8;
14935                 MP_WritePhyUshort(sc, 0x06, Data);
14936                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
14937                 Data = MP_ReadPhyUshort(sc, 0x06);
14938                 Data &= ~BIT_8;
14939                 MP_WritePhyUshort(sc, 0x06, Data);
14940                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
14941                 Data = MP_ReadPhyUshort(sc, 0x06);
14942                 Data &= ~BIT_8;
14943                 MP_WritePhyUshort(sc, 0x06, Data);
14944                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
14945
14946                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
14947                 Data = MP_ReadPhyUshort(sc, 0x19);
14948                 Data &= ~BIT_0;
14949                 MP_WritePhyUshort(sc, 0x19, Data);
14950                 Data = MP_ReadPhyUshort(sc, 0x10);
14951                 Data &= ~BIT_10;
14952                 MP_WritePhyUshort(sc, 0x10, Data);
14953                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
14954         } else if (sc->re_type == MACFG_41) {
14955                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
14956                 MP_WritePhyUshort(sc, 0x11, MP_ReadPhyUshort(sc, 0x11) | 0x1000);
14957                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
14958                 MP_WritePhyUshort(sc, 0x0F, MP_ReadPhyUshort(sc, 0x0F) | 0x0003);
14959                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
14960
14961                 for (Data_u32=0x800E0068; Data_u32<0x800E006D; Data_u32++) {
14962                         CSR_WRITE_4(sc, 0xF8, Data_u32);
14963                         for (i=0; i<10; i++) {
14964                                 DELAY(400);
14965                                 if ((CSR_READ_4(sc, 0xF8)&0x80000000)==0)
14966                                         break;
14967                         }
14968                 }
14969         } else if (sc->re_type == MACFG_42 || sc->re_type == MACFG_43) {
14970                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
14971                 Data_u32 &= 0xFFFF0000;
14972                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
14973
14974                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
14975                 MP_WritePhyUshort(sc, 0x18, 0x0310);
14976                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
14977
14978                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
14979                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
14980                 MP_WritePhyUshort(sc, 0x19, 0x7070);
14981                 MP_WritePhyUshort(sc, 0x1c, 0x0600);
14982                 MP_WritePhyUshort(sc, 0x1d, 0x9700);
14983                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
14984                 MP_WritePhyUshort(sc, 0x1d, 0x6900);
14985                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
14986                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
14987                 MP_WritePhyUshort(sc, 0x1d, 0x4899);
14988                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
14989                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
14990                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
14991                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
14992                 MP_WritePhyUshort(sc, 0x1d, 0x8000);
14993                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
14994                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
14995                 MP_WritePhyUshort(sc, 0x1d, 0x4007);
14996                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
14997                 MP_WritePhyUshort(sc, 0x1d, 0x4800);
14998                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
14999                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
15000                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
15001                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
15002                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
15003                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
15004                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15005                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15006                 MP_WritePhyUshort(sc, 0x1d, 0x571f);
15007                 MP_WritePhyUshort(sc, 0x1d, 0x5ffb);
15008                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
15009                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
15010                 MP_WritePhyUshort(sc, 0x1d, 0x301e);
15011                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
15012                 MP_WritePhyUshort(sc, 0x1d, 0xa6fc);
15013                 MP_WritePhyUshort(sc, 0x1d, 0xdcdb);
15014                 MP_WritePhyUshort(sc, 0x1d, 0x0014);
15015                 MP_WritePhyUshort(sc, 0x1d, 0xd9a9);
15016                 MP_WritePhyUshort(sc, 0x1d, 0x0013);
15017                 MP_WritePhyUshort(sc, 0x1d, 0xd16b);
15018                 MP_WritePhyUshort(sc, 0x1d, 0x0011);
15019                 MP_WritePhyUshort(sc, 0x1d, 0xb40e);
15020                 MP_WritePhyUshort(sc, 0x1d, 0xd06b);
15021                 MP_WritePhyUshort(sc, 0x1d, 0x000c);
15022                 MP_WritePhyUshort(sc, 0x1d, 0xb206);
15023                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
15024                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
15025                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
15026                 MP_WritePhyUshort(sc, 0x1d, 0x5c00);
15027                 MP_WritePhyUshort(sc, 0x1d, 0x301a);
15028                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
15029                 MP_WritePhyUshort(sc, 0x1d, 0x5801);
15030                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
15031                 MP_WritePhyUshort(sc, 0x1d, 0x5c04);
15032                 MP_WritePhyUshort(sc, 0x1d, 0x301e);
15033                 MP_WritePhyUshort(sc, 0x1d, 0x314d);
15034                 MP_WritePhyUshort(sc, 0x1d, 0x31f0);
15035                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15036                 MP_WritePhyUshort(sc, 0x1d, 0x4c20);
15037                 MP_WritePhyUshort(sc, 0x1d, 0x6004);
15038                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
15039                 MP_WritePhyUshort(sc, 0x1d, 0x4833);
15040                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15041                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
15042                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15043                 MP_WritePhyUshort(sc, 0x1d, 0x4c08);
15044                 MP_WritePhyUshort(sc, 0x1d, 0x8300);
15045                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
15046                 MP_WritePhyUshort(sc, 0x1d, 0x6600);
15047                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15048                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15049                 MP_WritePhyUshort(sc, 0x1d, 0xb90c);
15050                 MP_WritePhyUshort(sc, 0x1d, 0x30d3);
15051                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15052                 MP_WritePhyUshort(sc, 0x1d, 0x4de0);
15053                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
15054                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
15055                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
15056                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
15057                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15058                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15059                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
15060                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
15061                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15062                 MP_WritePhyUshort(sc, 0x1d, 0x4c60);
15063                 MP_WritePhyUshort(sc, 0x1d, 0x6803);
15064                 MP_WritePhyUshort(sc, 0x1d, 0x6520);
15065                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15066                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15067                 MP_WritePhyUshort(sc, 0x1d, 0xaf03);
15068                 MP_WritePhyUshort(sc, 0x1d, 0x6015);
15069                 MP_WritePhyUshort(sc, 0x1d, 0x3059);
15070                 MP_WritePhyUshort(sc, 0x1d, 0x6017);
15071                 MP_WritePhyUshort(sc, 0x1d, 0x57e0);
15072                 MP_WritePhyUshort(sc, 0x1d, 0x580c);
15073                 MP_WritePhyUshort(sc, 0x1d, 0x588c);
15074                 MP_WritePhyUshort(sc, 0x1d, 0x7ffc);
15075                 MP_WritePhyUshort(sc, 0x1d, 0x5fa3);
15076                 MP_WritePhyUshort(sc, 0x1d, 0x4827);
15077                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15078                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
15079                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15080                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
15081                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
15082                 MP_WritePhyUshort(sc, 0x1d, 0x7c30);
15083                 MP_WritePhyUshort(sc, 0x1d, 0x6020);
15084                 MP_WritePhyUshort(sc, 0x1d, 0x48bf);
15085                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15086                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
15087                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15088                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
15089                 MP_WritePhyUshort(sc, 0x1d, 0xad09);
15090                 MP_WritePhyUshort(sc, 0x1d, 0x7c03);
15091                 MP_WritePhyUshort(sc, 0x1d, 0x5c03);
15092                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15093                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15094                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15095                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15096                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15097                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
15098                 MP_WritePhyUshort(sc, 0x1d, 0xad2c);
15099                 MP_WritePhyUshort(sc, 0x1d, 0xd6cf);
15100                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
15101                 MP_WritePhyUshort(sc, 0x1d, 0x80f4);
15102                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15103                 MP_WritePhyUshort(sc, 0x1d, 0x4c80);
15104                 MP_WritePhyUshort(sc, 0x1d, 0x7c20);
15105                 MP_WritePhyUshort(sc, 0x1d, 0x5c20);
15106                 MP_WritePhyUshort(sc, 0x1d, 0x481e);
15107                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15108                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
15109                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15110                 MP_WritePhyUshort(sc, 0x1d, 0x4c02);
15111                 MP_WritePhyUshort(sc, 0x1d, 0xad0a);
15112                 MP_WritePhyUshort(sc, 0x1d, 0x7c03);
15113                 MP_WritePhyUshort(sc, 0x1d, 0x5c03);
15114                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15115                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15116                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15117                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15118                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15119                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
15120                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
15121                 MP_WritePhyUshort(sc, 0x1d, 0x8d02);
15122                 MP_WritePhyUshort(sc, 0x1d, 0x4401);
15123                 MP_WritePhyUshort(sc, 0x1d, 0x81f4);
15124                 MP_WritePhyUshort(sc, 0x1d, 0x3114);
15125                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15126                 MP_WritePhyUshort(sc, 0x1d, 0x4d00);
15127                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
15128                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15129                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
15130                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15131                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
15132                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
15133                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
15134                 MP_WritePhyUshort(sc, 0x1d, 0xa4b7);
15135                 MP_WritePhyUshort(sc, 0x1d, 0xd9b3);
15136                 MP_WritePhyUshort(sc, 0x1d, 0xfffe);
15137                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15138                 MP_WritePhyUshort(sc, 0x1d, 0x4d20);
15139                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
15140                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
15141                 MP_WritePhyUshort(sc, 0x1d, 0x3045);
15142                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15143                 MP_WritePhyUshort(sc, 0x1d, 0x4d40);
15144                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
15145                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
15146                 MP_WritePhyUshort(sc, 0x1d, 0x4401);
15147                 MP_WritePhyUshort(sc, 0x1d, 0x5210);
15148                 MP_WritePhyUshort(sc, 0x1d, 0x4833);
15149                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
15150                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
15151                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
15152                 MP_WritePhyUshort(sc, 0x1d, 0x4c08);
15153                 MP_WritePhyUshort(sc, 0x1d, 0x8300);
15154                 MP_WritePhyUshort(sc, 0x1d, 0x5f80);
15155                 MP_WritePhyUshort(sc, 0x1d, 0x55e0);
15156                 MP_WritePhyUshort(sc, 0x1d, 0xc06f);
15157                 MP_WritePhyUshort(sc, 0x1d, 0x0005);
15158                 MP_WritePhyUshort(sc, 0x1d, 0xd9b3);
15159                 MP_WritePhyUshort(sc, 0x1d, 0xfffd);
15160                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
15161                 MP_WritePhyUshort(sc, 0x1d, 0x6040);
15162                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15163                 MP_WritePhyUshort(sc, 0x1d, 0x4d60);
15164                 MP_WritePhyUshort(sc, 0x1d, 0x57e0);
15165                 MP_WritePhyUshort(sc, 0x1d, 0x4814);
15166                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
15167                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
15168                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
15169                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
15170                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
15171                 MP_WritePhyUshort(sc, 0x1d, 0x7c03);
15172                 MP_WritePhyUshort(sc, 0x1d, 0x5c03);
15173                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15174                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15175                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15176                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15177                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15178                 MP_WritePhyUshort(sc, 0x1d, 0xad02);
15179                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
15180                 MP_WritePhyUshort(sc, 0x1d, 0xc0e9);
15181                 MP_WritePhyUshort(sc, 0x1d, 0x0003);
15182                 MP_WritePhyUshort(sc, 0x1d, 0xadd8);
15183                 MP_WritePhyUshort(sc, 0x1d, 0x30c6);
15184                 MP_WritePhyUshort(sc, 0x1d, 0x3078);
15185                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15186                 MP_WritePhyUshort(sc, 0x1d, 0x4dc0);
15187                 MP_WritePhyUshort(sc, 0x1d, 0x6730);
15188                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15189                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15190                 MP_WritePhyUshort(sc, 0x1d, 0xd09d);
15191                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
15192                 MP_WritePhyUshort(sc, 0x1d, 0xb4fe);
15193                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15194                 MP_WritePhyUshort(sc, 0x1d, 0x4d80);
15195                 MP_WritePhyUshort(sc, 0x1d, 0x6802);
15196                 MP_WritePhyUshort(sc, 0x1d, 0x6600);
15197                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15198                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15199                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
15200                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
15201                 MP_WritePhyUshort(sc, 0x1d, 0x486c);
15202                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15203                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
15204                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15205                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
15206                 MP_WritePhyUshort(sc, 0x1d, 0x9503);
15207                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
15208                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
15209                 MP_WritePhyUshort(sc, 0x1d, 0x571f);
15210                 MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
15211                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
15212                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
15213                 MP_WritePhyUshort(sc, 0x1d, 0x30e9);
15214                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
15215                 MP_WritePhyUshort(sc, 0x1d, 0xcdab);
15216                 MP_WritePhyUshort(sc, 0x1d, 0xff5b);
15217                 MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
15218                 MP_WritePhyUshort(sc, 0x1d, 0xff59);
15219                 MP_WritePhyUshort(sc, 0x1d, 0xd96b);
15220                 MP_WritePhyUshort(sc, 0x1d, 0xff57);
15221                 MP_WritePhyUshort(sc, 0x1d, 0xd0a0);
15222                 MP_WritePhyUshort(sc, 0x1d, 0xffdb);
15223                 MP_WritePhyUshort(sc, 0x1d, 0xcba0);
15224                 MP_WritePhyUshort(sc, 0x1d, 0x0003);
15225                 MP_WritePhyUshort(sc, 0x1d, 0x80f0);
15226                 MP_WritePhyUshort(sc, 0x1d, 0x30f6);
15227                 MP_WritePhyUshort(sc, 0x1d, 0x3109);
15228                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15229                 MP_WritePhyUshort(sc, 0x1d, 0x4ce0);
15230                 MP_WritePhyUshort(sc, 0x1d, 0x7d30);
15231                 MP_WritePhyUshort(sc, 0x1d, 0x6530);
15232                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15233                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15234                 MP_WritePhyUshort(sc, 0x1d, 0x7ce0);
15235                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
15236                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
15237                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15238                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
15239                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15240                 MP_WritePhyUshort(sc, 0x1d, 0x4c08);
15241                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
15242                 MP_WritePhyUshort(sc, 0x1d, 0x6008);
15243                 MP_WritePhyUshort(sc, 0x1d, 0x8300);
15244                 MP_WritePhyUshort(sc, 0x1d, 0xb902);
15245                 MP_WritePhyUshort(sc, 0x1d, 0x30d3);
15246                 MP_WritePhyUshort(sc, 0x1d, 0x308f);
15247                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15248                 MP_WritePhyUshort(sc, 0x1d, 0x4da0);
15249                 MP_WritePhyUshort(sc, 0x1d, 0x57a0);
15250                 MP_WritePhyUshort(sc, 0x1d, 0x590c);
15251                 MP_WritePhyUshort(sc, 0x1d, 0x5fa2);
15252                 MP_WritePhyUshort(sc, 0x1d, 0xcba4);
15253                 MP_WritePhyUshort(sc, 0x1d, 0x0005);
15254                 MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
15255                 MP_WritePhyUshort(sc, 0x1d, 0x0003);
15256                 MP_WritePhyUshort(sc, 0x1d, 0x80fc);
15257                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15258                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15259                 MP_WritePhyUshort(sc, 0x1d, 0x4ca0);
15260                 MP_WritePhyUshort(sc, 0x1d, 0xb603);
15261                 MP_WritePhyUshort(sc, 0x1d, 0x7c10);
15262                 MP_WritePhyUshort(sc, 0x1d, 0x6010);
15263                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15264                 MP_WritePhyUshort(sc, 0x1d, 0x541f);
15265                 MP_WritePhyUshort(sc, 0x1d, 0x7ffc);
15266                 MP_WritePhyUshort(sc, 0x1d, 0x5fb3);
15267                 MP_WritePhyUshort(sc, 0x1d, 0x9403);
15268                 MP_WritePhyUshort(sc, 0x1d, 0x7c03);
15269                 MP_WritePhyUshort(sc, 0x1d, 0x5c03);
15270                 MP_WritePhyUshort(sc, 0x1d, 0xaa05);
15271                 MP_WritePhyUshort(sc, 0x1d, 0x7c80);
15272                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
15273                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
15274                 MP_WritePhyUshort(sc, 0x1d, 0x3128);
15275                 MP_WritePhyUshort(sc, 0x1d, 0x7c80);
15276                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
15277                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
15278                 MP_WritePhyUshort(sc, 0x1d, 0x4827);
15279                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15280                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
15281                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15282                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
15283                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
15284                 MP_WritePhyUshort(sc, 0x1d, 0x7c10);
15285                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
15286                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
15287                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15288                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
15289                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15290                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
15291                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
15292                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15293                 MP_WritePhyUshort(sc, 0x1d, 0x4cc0);
15294                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
15295                 MP_WritePhyUshort(sc, 0x1d, 0x6400);
15296                 MP_WritePhyUshort(sc, 0x1d, 0x7ffc);
15297                 MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
15298                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
15299                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15300                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
15301                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15302                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
15303                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
15304                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
15305                 MP_WritePhyUshort(sc, 0x1d, 0x6a00);
15306                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
15307                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15308                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
15309                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15310                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
15311                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
15312                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
15313                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
15314                 MP_WritePhyUshort(sc, 0x1d, 0x30f6);
15315                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15316                 MP_WritePhyUshort(sc, 0x1d, 0x4e00);
15317                 MP_WritePhyUshort(sc, 0x1d, 0x4007);
15318                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
15319                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
15320                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
15321                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
15322                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15323                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15324                 MP_WritePhyUshort(sc, 0x1d, 0x570f);
15325                 MP_WritePhyUshort(sc, 0x1d, 0x5fff);
15326                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
15327                 MP_WritePhyUshort(sc, 0x1d, 0x585b);
15328                 MP_WritePhyUshort(sc, 0x1d, 0x315c);
15329                 MP_WritePhyUshort(sc, 0x1d, 0x5867);
15330                 MP_WritePhyUshort(sc, 0x1d, 0x9402);
15331                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
15332                 MP_WritePhyUshort(sc, 0x1d, 0xcda3);
15333                 MP_WritePhyUshort(sc, 0x1d, 0x009d);
15334                 MP_WritePhyUshort(sc, 0x1d, 0xcd85);
15335                 MP_WritePhyUshort(sc, 0x1d, 0x009b);
15336                 MP_WritePhyUshort(sc, 0x1d, 0xd96b);
15337                 MP_WritePhyUshort(sc, 0x1d, 0x0099);
15338                 MP_WritePhyUshort(sc, 0x1d, 0x96e9);
15339                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
15340                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
15341                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15342                 MP_WritePhyUshort(sc, 0x1d, 0x4e20);
15343                 MP_WritePhyUshort(sc, 0x1d, 0x96e4);
15344                 MP_WritePhyUshort(sc, 0x1d, 0x8b04);
15345                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
15346                 MP_WritePhyUshort(sc, 0x1d, 0x5008);
15347                 MP_WritePhyUshort(sc, 0x1d, 0xab03);
15348                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
15349                 MP_WritePhyUshort(sc, 0x1d, 0x5000);
15350                 MP_WritePhyUshort(sc, 0x1d, 0x6801);
15351                 MP_WritePhyUshort(sc, 0x1d, 0x6776);
15352                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15353                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15354                 MP_WritePhyUshort(sc, 0x1d, 0xdb7c);
15355                 MP_WritePhyUshort(sc, 0x1d, 0xfff0);
15356                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15357                 MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
15358                 MP_WritePhyUshort(sc, 0x1d, 0x4e40);
15359                 MP_WritePhyUshort(sc, 0x1d, 0x4837);
15360                 MP_WritePhyUshort(sc, 0x1d, 0x4418);
15361                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
15362                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15363                 MP_WritePhyUshort(sc, 0x1d, 0x4e40);
15364                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
15365                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
15366                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15367                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
15368                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15369                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
15370                 MP_WritePhyUshort(sc, 0x1d, 0x8fc9);
15371                 MP_WritePhyUshort(sc, 0x1d, 0xd2a0);
15372                 MP_WritePhyUshort(sc, 0x1d, 0x004a);
15373                 MP_WritePhyUshort(sc, 0x1d, 0x9203);
15374                 MP_WritePhyUshort(sc, 0x1d, 0xa041);
15375                 MP_WritePhyUshort(sc, 0x1d, 0x3184);
15376                 MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
15377                 MP_WritePhyUshort(sc, 0x1d, 0x4e60);
15378                 MP_WritePhyUshort(sc, 0x1d, 0x489c);
15379                 MP_WritePhyUshort(sc, 0x1d, 0x4628);
15380                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15381                 MP_WritePhyUshort(sc, 0x1d, 0x4e60);
15382                 MP_WritePhyUshort(sc, 0x1d, 0x7e28);
15383                 MP_WritePhyUshort(sc, 0x1d, 0x4628);
15384                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
15385                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
15386                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
15387                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
15388                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
15389                 MP_WritePhyUshort(sc, 0x1d, 0x5c00);
15390                 MP_WritePhyUshort(sc, 0x1d, 0x41e8);
15391                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15392                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
15393                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15394                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
15395                 MP_WritePhyUshort(sc, 0x1d, 0x8fb0);
15396                 MP_WritePhyUshort(sc, 0x1d, 0xb241);
15397                 MP_WritePhyUshort(sc, 0x1d, 0xa02a);
15398                 MP_WritePhyUshort(sc, 0x1d, 0x319d);
15399                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15400                 MP_WritePhyUshort(sc, 0x1d, 0x4ea0);
15401                 MP_WritePhyUshort(sc, 0x1d, 0x7c02);
15402                 MP_WritePhyUshort(sc, 0x1d, 0x4402);
15403                 MP_WritePhyUshort(sc, 0x1d, 0x4448);
15404                 MP_WritePhyUshort(sc, 0x1d, 0x4894);
15405                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15406                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
15407                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15408                 MP_WritePhyUshort(sc, 0x1d, 0x4c03);
15409                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
15410                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15411                 MP_WritePhyUshort(sc, 0x1d, 0x4c07);
15412                 MP_WritePhyUshort(sc, 0x1d, 0x41ef);
15413                 MP_WritePhyUshort(sc, 0x1d, 0x41ff);
15414                 MP_WritePhyUshort(sc, 0x1d, 0x4891);
15415                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15416                 MP_WritePhyUshort(sc, 0x1d, 0x4c07);
15417                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15418                 MP_WritePhyUshort(sc, 0x1d, 0x4c17);
15419                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
15420                 MP_WritePhyUshort(sc, 0x1d, 0x8ef8);
15421                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
15422                 MP_WritePhyUshort(sc, 0x1d, 0x8f95);
15423                 MP_WritePhyUshort(sc, 0x1d, 0x92d5);
15424                 MP_WritePhyUshort(sc, 0x1d, 0xa10f);
15425                 MP_WritePhyUshort(sc, 0x1d, 0xd480);
15426                 MP_WritePhyUshort(sc, 0x1d, 0x0008);
15427                 MP_WritePhyUshort(sc, 0x1d, 0xd580);
15428                 MP_WritePhyUshort(sc, 0x1d, 0xffb9);
15429                 MP_WritePhyUshort(sc, 0x1d, 0xa202);
15430                 MP_WritePhyUshort(sc, 0x1d, 0x31b8);
15431                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
15432                 MP_WritePhyUshort(sc, 0x1d, 0x4404);
15433                 MP_WritePhyUshort(sc, 0x1d, 0x31b8);
15434                 MP_WritePhyUshort(sc, 0x1d, 0xd484);
15435                 MP_WritePhyUshort(sc, 0x1d, 0xfff3);
15436                 MP_WritePhyUshort(sc, 0x1d, 0xd484);
15437                 MP_WritePhyUshort(sc, 0x1d, 0xfff1);
15438                 MP_WritePhyUshort(sc, 0x1d, 0x314d);
15439                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15440                 MP_WritePhyUshort(sc, 0x1d, 0x4ee0);
15441                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
15442                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
15443                 MP_WritePhyUshort(sc, 0x1d, 0x4488);
15444                 MP_WritePhyUshort(sc, 0x1d, 0x41cf);
15445                 MP_WritePhyUshort(sc, 0x1d, 0x314d);
15446                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15447                 MP_WritePhyUshort(sc, 0x1d, 0x4ec0);
15448                 MP_WritePhyUshort(sc, 0x1d, 0x48f3);
15449                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15450                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
15451                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15452                 MP_WritePhyUshort(sc, 0x1d, 0x4c09);
15453                 MP_WritePhyUshort(sc, 0x1d, 0x4508);
15454                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
15455                 MP_WritePhyUshort(sc, 0x1d, 0x8f24);
15456                 MP_WritePhyUshort(sc, 0x1d, 0xd218);
15457                 MP_WritePhyUshort(sc, 0x1d, 0x0022);
15458                 MP_WritePhyUshort(sc, 0x1d, 0xd2a4);
15459                 MP_WritePhyUshort(sc, 0x1d, 0xff9f);
15460                 MP_WritePhyUshort(sc, 0x1d, 0x31d9);
15461                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
15462                 MP_WritePhyUshort(sc, 0x1d, 0x4e80);
15463                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
15464                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15465                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
15466                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
15467                 MP_WritePhyUshort(sc, 0x1d, 0x4c11);
15468                 MP_WritePhyUshort(sc, 0x1d, 0x4428);
15469                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
15470                 MP_WritePhyUshort(sc, 0x1d, 0x5440);
15471                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
15472                 MP_WritePhyUshort(sc, 0x1d, 0x5801);
15473                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
15474                 MP_WritePhyUshort(sc, 0x1d, 0x5c04);
15475                 MP_WritePhyUshort(sc, 0x1d, 0x41e8);
15476                 MP_WritePhyUshort(sc, 0x1d, 0xa4b3);
15477                 MP_WritePhyUshort(sc, 0x1d, 0x31ee);
15478                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
15479                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
15480                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15481                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
15482                 MP_WritePhyUshort(sc, 0x1d, 0x570f);
15483                 MP_WritePhyUshort(sc, 0x1d, 0x5fff);
15484                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
15485                 MP_WritePhyUshort(sc, 0x1d, 0x585b);
15486                 MP_WritePhyUshort(sc, 0x1d, 0x31fa);
15487                 MP_WritePhyUshort(sc, 0x1d, 0x5867);
15488                 MP_WritePhyUshort(sc, 0x1d, 0xbcf6);
15489                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
15490                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
15491                 MP_WritePhyUshort(sc, 0x1d, 0x314d);
15492                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
15493                 MP_WritePhyUshort(sc, 0x1c, 0x0200);
15494                 MP_WritePhyUshort(sc, 0x19, 0x7030);
15495                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
15496
15497                 if (CSR_READ_1(sc, 0xEF)&0x08) {
15498                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
15499                         MP_WritePhyUshort(sc, 0x1A, 0x0004);
15500                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
15501                 } else {
15502                         MP_WritePhyUshort(sc, 0x1F, 0x0005);
15503                         MP_WritePhyUshort(sc, 0x1A, 0x0000);
15504                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
15505                 }
15506
15507                 if (CSR_READ_1(sc, 0xEF)&0x10) {
15508                         MP_WritePhyUshort(sc, 0x1F, 0x0004);
15509                         MP_WritePhyUshort(sc, 0x1C, 0x0000);
15510                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
15511                 } else {
15512                         MP_WritePhyUshort(sc, 0x1F, 0x0004);
15513                         MP_WritePhyUshort(sc, 0x1C, 0x0200);
15514                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
15515                 }
15516
15517                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
15518                 MP_WritePhyUshort(sc, 0x15, 0x7701);
15519                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
15520
15521                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
15522                 ClearEthPhyBit(sc, 0x1A, BIT_14);
15523
15524                 if (phy_power_saving == 1) {
15525                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
15526                         MP_WritePhyUshort(sc, 0x18, 0x8310);
15527                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
15528                 } else {
15529                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
15530                         MP_WritePhyUshort(sc, 0x18, 0x0310);
15531                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
15532                         DELAY(20000);
15533                 }
15534
15535                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
15536                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
15537                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
15538                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
15539                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
15540                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
15541                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
15542                 MP_WritePhyUshort(sc, 0x0D, 0x0003);
15543                 MP_WritePhyUshort(sc, 0x0E, 0x0015);
15544                 MP_WritePhyUshort(sc, 0x0D, 0x4003);
15545                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
15546                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
15547
15548         } else if (sc->re_type == MACFG_50) {
15549                 MP_WritePhyUshort(sc,0x1f, 0x0000);
15550                 MP_WritePhyUshort(sc,0x00, 0x1800);
15551                 Data = MP_ReadPhyUshort(sc, 0x15);
15552                 Data &= ~(BIT_12);
15553                 MP_WritePhyUshort(sc,0x15, Data);
15554                 MP_WritePhyUshort(sc,0x00, 0x4800);
15555                 MP_WritePhyUshort(sc,0x1f, 0x0007);
15556                 MP_WritePhyUshort(sc,0x1e, 0x002f);
15557                 for (i = 0; i < 1000; i++) {
15558                         DELAY(100);
15559                         Data = MP_ReadPhyUshort(sc, 0x1c);
15560                         if (Data & BIT_7)
15561                                 break;
15562                 }
15563                 MP_WritePhyUshort(sc,0x1f, 0x0000);
15564                 MP_WritePhyUshort(sc,0x00, 0x1800);
15565                 MP_WritePhyUshort(sc,0x1f, 0x0007);
15566                 MP_WritePhyUshort(sc,0x1e, 0x0023);
15567                 for (i = 0; i < 200; i++) {
15568                         DELAY(100);
15569                         Data = MP_ReadPhyUshort(sc, 0x18);
15570                         if (!(Data & BIT_0))
15571                                 break;
15572                 }
15573                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
15574                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
15575                 MP_WritePhyUshort(sc, 0x06, 0x0080);
15576                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
15577                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
15578                 MP_WritePhyUshort(sc, 0x16, 0x0306);
15579                 MP_WritePhyUshort(sc, 0x16, 0x0307);
15580                 MP_WritePhyUshort(sc, 0x15, 0x0194);
15581                 MP_WritePhyUshort(sc, 0x19, 0x407D);
15582                 MP_WritePhyUshort(sc, 0x15, 0x0098);
15583                 MP_WritePhyUshort(sc, 0x19, 0x7c0b);
15584                 MP_WritePhyUshort(sc, 0x15, 0x0099);
15585                 MP_WritePhyUshort(sc, 0x19, 0x6c0b);
15586                 MP_WritePhyUshort(sc, 0x15, 0x00eb);
15587                 MP_WritePhyUshort(sc, 0x19, 0x6c0b);
15588                 MP_WritePhyUshort(sc, 0x15, 0x00f8);
15589                 MP_WritePhyUshort(sc, 0x19, 0x6f0b);
15590                 MP_WritePhyUshort(sc, 0x15, 0x00fe);
15591                 MP_WritePhyUshort(sc, 0x19, 0x6f0f);
15592                 MP_WritePhyUshort(sc, 0x15, 0x00db);
15593                 MP_WritePhyUshort(sc, 0x19, 0x6f09);
15594                 MP_WritePhyUshort(sc, 0x15, 0x00dc);
15595                 MP_WritePhyUshort(sc, 0x19, 0xaefd);
15596                 MP_WritePhyUshort(sc, 0x15, 0x00dd);
15597                 MP_WritePhyUshort(sc, 0x19, 0x6f0b);
15598                 MP_WritePhyUshort(sc, 0x15, 0x00de);
15599                 MP_WritePhyUshort(sc, 0x19, 0xc60b);
15600                 MP_WritePhyUshort(sc, 0x15, 0x00df);
15601                 MP_WritePhyUshort(sc, 0x19, 0x00fa);
15602                 MP_WritePhyUshort(sc, 0x15, 0x00e0);
15603                 MP_WritePhyUshort(sc, 0x19, 0x30e1);
15604                 MP_WritePhyUshort(sc, 0x15, 0x020c);
15605                 MP_WritePhyUshort(sc, 0x19, 0x3224);
15606                 MP_WritePhyUshort(sc, 0x15, 0x020e);
15607                 MP_WritePhyUshort(sc, 0x19, 0x9813);
15608                 MP_WritePhyUshort(sc, 0x15, 0x020f);
15609                 MP_WritePhyUshort(sc, 0x19, 0x7801);
15610                 MP_WritePhyUshort(sc, 0x15, 0x0210);
15611                 MP_WritePhyUshort(sc, 0x19, 0x930f);
15612                 MP_WritePhyUshort(sc, 0x15, 0x0211);
15613                 MP_WritePhyUshort(sc, 0x19, 0x9206);
15614                 MP_WritePhyUshort(sc, 0x15, 0x0212);
15615                 MP_WritePhyUshort(sc, 0x19, 0x4002);
15616                 MP_WritePhyUshort(sc, 0x15, 0x0213);
15617                 MP_WritePhyUshort(sc, 0x19, 0x7800);
15618                 MP_WritePhyUshort(sc, 0x15, 0x0214);
15619                 MP_WritePhyUshort(sc, 0x19, 0x588f);
15620                 MP_WritePhyUshort(sc, 0x15, 0x0215);
15621                 MP_WritePhyUshort(sc, 0x19, 0x5520);
15622                 MP_WritePhyUshort(sc, 0x15, 0x0216);
15623                 MP_WritePhyUshort(sc, 0x19, 0x3224);
15624                 MP_WritePhyUshort(sc, 0x15, 0x0217);
15625                 MP_WritePhyUshort(sc, 0x19, 0x4002);
15626                 MP_WritePhyUshort(sc, 0x15, 0x0218);
15627                 MP_WritePhyUshort(sc, 0x19, 0x7800);
15628                 MP_WritePhyUshort(sc, 0x15, 0x0219);
15629                 MP_WritePhyUshort(sc, 0x19, 0x588d);
15630                 MP_WritePhyUshort(sc, 0x15, 0x021a);
15631                 MP_WritePhyUshort(sc, 0x19, 0x5540);
15632                 MP_WritePhyUshort(sc, 0x15, 0x021b);
15633                 MP_WritePhyUshort(sc, 0x19, 0x9e03);
15634                 MP_WritePhyUshort(sc, 0x15, 0x021c);
15635                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
15636                 MP_WritePhyUshort(sc, 0x15, 0x021d);
15637                 MP_WritePhyUshort(sc, 0x19, 0x6840);
15638                 MP_WritePhyUshort(sc, 0x15, 0x021e);
15639                 MP_WritePhyUshort(sc, 0x19, 0x3224);
15640                 MP_WritePhyUshort(sc, 0x15, 0x021f);
15641                 MP_WritePhyUshort(sc, 0x19, 0x4002);
15642                 MP_WritePhyUshort(sc, 0x15, 0x0220);
15643                 MP_WritePhyUshort(sc, 0x19, 0x3224);
15644                 MP_WritePhyUshort(sc, 0x15, 0x0221);
15645                 MP_WritePhyUshort(sc, 0x19, 0x9e03);
15646                 MP_WritePhyUshort(sc, 0x15, 0x0222);
15647                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
15648                 MP_WritePhyUshort(sc, 0x15, 0x0223);
15649                 MP_WritePhyUshort(sc, 0x19, 0x6840);
15650                 MP_WritePhyUshort(sc, 0x15, 0x0224);
15651                 MP_WritePhyUshort(sc, 0x19, 0x7800);
15652                 MP_WritePhyUshort(sc, 0x15, 0x0225);
15653                 MP_WritePhyUshort(sc, 0x19, 0x3231);
15654                 MP_WritePhyUshort(sc, 0x15, 0x0000);
15655                 MP_WritePhyUshort(sc, 0x16, 0x0306);
15656                 MP_WritePhyUshort(sc, 0x16, 0x0300);
15657                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
15658                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
15659                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
15660                 MP_WritePhyUshort(sc, 0x06, 0x0080);
15661                 MP_WritePhyUshort(sc, 0x05, 0x8000);
15662                 MP_WritePhyUshort(sc, 0x06, 0x0280);
15663                 MP_WritePhyUshort(sc, 0x06, 0x48f7);
15664                 MP_WritePhyUshort(sc, 0x06, 0x00e0);
15665                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
15666                 MP_WritePhyUshort(sc, 0x06, 0xa080);
15667                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
15668                 MP_WritePhyUshort(sc, 0x06, 0xf602);
15669                 MP_WritePhyUshort(sc, 0x06, 0x0118);
15670                 MP_WritePhyUshort(sc, 0x06, 0x0201);
15671                 MP_WritePhyUshort(sc, 0x06, 0x2502);
15672                 MP_WritePhyUshort(sc, 0x06, 0x8090);
15673                 MP_WritePhyUshort(sc, 0x06, 0x0201);
15674                 MP_WritePhyUshort(sc, 0x06, 0x4202);
15675                 MP_WritePhyUshort(sc, 0x06, 0x015c);
15676                 MP_WritePhyUshort(sc, 0x06, 0x0280);
15677                 MP_WritePhyUshort(sc, 0x06, 0xad02);
15678                 MP_WritePhyUshort(sc, 0x06, 0x80ca);
15679                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15680                 MP_WritePhyUshort(sc, 0x06, 0x88e1);
15681                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
15682                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
15683                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
15684                 MP_WritePhyUshort(sc, 0x06, 0x8a1e);
15685                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
15686                 MP_WritePhyUshort(sc, 0x06, 0x8b8b);
15687                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
15688                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
15689                 MP_WritePhyUshort(sc, 0x06, 0x8c1e);
15690                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
15691                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
15692                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
15693                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
15694                 MP_WritePhyUshort(sc, 0x06, 0x8e1e);
15695                 MP_WritePhyUshort(sc, 0x06, 0x01a0);
15696                 MP_WritePhyUshort(sc, 0x06, 0x00c7);
15697                 MP_WritePhyUshort(sc, 0x06, 0xaebb);
15698                 MP_WritePhyUshort(sc, 0x06, 0xd484);
15699                 MP_WritePhyUshort(sc, 0x06, 0x3ce4);
15700                 MP_WritePhyUshort(sc, 0x06, 0x8b92);
15701                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
15702                 MP_WritePhyUshort(sc, 0x06, 0x93ee);
15703                 MP_WritePhyUshort(sc, 0x06, 0x8ac8);
15704                 MP_WritePhyUshort(sc, 0x06, 0x03ee);
15705                 MP_WritePhyUshort(sc, 0x06, 0x8aca);
15706                 MP_WritePhyUshort(sc, 0x06, 0x60ee);
15707                 MP_WritePhyUshort(sc, 0x06, 0x8ac0);
15708                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
15709                 MP_WritePhyUshort(sc, 0x06, 0x8ac1);
15710                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
15711                 MP_WritePhyUshort(sc, 0x06, 0x8abe);
15712                 MP_WritePhyUshort(sc, 0x06, 0x07ee);
15713                 MP_WritePhyUshort(sc, 0x06, 0x8abf);
15714                 MP_WritePhyUshort(sc, 0x06, 0x73ee);
15715                 MP_WritePhyUshort(sc, 0x06, 0x8a95);
15716                 MP_WritePhyUshort(sc, 0x06, 0x02bf);
15717                 MP_WritePhyUshort(sc, 0x06, 0x8b88);
15718                 MP_WritePhyUshort(sc, 0x06, 0xec00);
15719                 MP_WritePhyUshort(sc, 0x06, 0x19a9);
15720                 MP_WritePhyUshort(sc, 0x06, 0x8b90);
15721                 MP_WritePhyUshort(sc, 0x06, 0xf9ee);
15722                 MP_WritePhyUshort(sc, 0x06, 0xfff6);
15723                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
15724                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
15725                 MP_WritePhyUshort(sc, 0x06, 0xfed1);
15726                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
15727                 MP_WritePhyUshort(sc, 0x06, 0x85a4);
15728                 MP_WritePhyUshort(sc, 0x06, 0x0238);
15729                 MP_WritePhyUshort(sc, 0x06, 0x7dd1);
15730                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
15731                 MP_WritePhyUshort(sc, 0x06, 0x85a7);
15732                 MP_WritePhyUshort(sc, 0x06, 0x0238);
15733                 MP_WritePhyUshort(sc, 0x06, 0x7d04);
15734                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
15735                 MP_WritePhyUshort(sc, 0x06, 0x8b8a);
15736                 MP_WritePhyUshort(sc, 0x06, 0xad20);
15737                 MP_WritePhyUshort(sc, 0x06, 0x14ee);
15738                 MP_WritePhyUshort(sc, 0x06, 0x8b8a);
15739                 MP_WritePhyUshort(sc, 0x06, 0x0002);
15740                 MP_WritePhyUshort(sc, 0x06, 0x204b);
15741                 MP_WritePhyUshort(sc, 0x06, 0xe0e4);
15742                 MP_WritePhyUshort(sc, 0x06, 0x26e1);
15743                 MP_WritePhyUshort(sc, 0x06, 0xe427);
15744                 MP_WritePhyUshort(sc, 0x06, 0xeee4);
15745                 MP_WritePhyUshort(sc, 0x06, 0x2623);
15746                 MP_WritePhyUshort(sc, 0x06, 0xe5e4);
15747                 MP_WritePhyUshort(sc, 0x06, 0x27fc);
15748                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
15749                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15750                 MP_WritePhyUshort(sc, 0x06, 0x8dad);
15751                 MP_WritePhyUshort(sc, 0x06, 0x2014);
15752                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
15753                 MP_WritePhyUshort(sc, 0x06, 0x8d00);
15754                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
15755                 MP_WritePhyUshort(sc, 0x06, 0x5a78);
15756                 MP_WritePhyUshort(sc, 0x06, 0x039e);
15757                 MP_WritePhyUshort(sc, 0x06, 0x0902);
15758                 MP_WritePhyUshort(sc, 0x06, 0x05e8);
15759                 MP_WritePhyUshort(sc, 0x06, 0x0281);
15760                 MP_WritePhyUshort(sc, 0x06, 0x4f02);
15761                 MP_WritePhyUshort(sc, 0x06, 0x326c);
15762                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
15763                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
15764                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15765                 MP_WritePhyUshort(sc, 0x06, 0xad20);
15766                 MP_WritePhyUshort(sc, 0x06, 0x1df6);
15767                 MP_WritePhyUshort(sc, 0x06, 0x20e4);
15768                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15769                 MP_WritePhyUshort(sc, 0x06, 0x022f);
15770                 MP_WritePhyUshort(sc, 0x06, 0x0902);
15771                 MP_WritePhyUshort(sc, 0x06, 0x2ab0);
15772                 MP_WritePhyUshort(sc, 0x06, 0x0285);
15773                 MP_WritePhyUshort(sc, 0x06, 0x1602);
15774                 MP_WritePhyUshort(sc, 0x06, 0x03ba);
15775                 MP_WritePhyUshort(sc, 0x06, 0x0284);
15776                 MP_WritePhyUshort(sc, 0x06, 0xe502);
15777                 MP_WritePhyUshort(sc, 0x06, 0x2df1);
15778                 MP_WritePhyUshort(sc, 0x06, 0x0283);
15779                 MP_WritePhyUshort(sc, 0x06, 0x8302);
15780                 MP_WritePhyUshort(sc, 0x06, 0x0475);
15781                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15782                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
15783                 MP_WritePhyUshort(sc, 0x06, 0x210b);
15784                 MP_WritePhyUshort(sc, 0x06, 0xf621);
15785                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
15786                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
15787                 MP_WritePhyUshort(sc, 0x06, 0x83f8);
15788                 MP_WritePhyUshort(sc, 0x06, 0x021c);
15789                 MP_WritePhyUshort(sc, 0x06, 0x99e0);
15790                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15791                 MP_WritePhyUshort(sc, 0x06, 0xad22);
15792                 MP_WritePhyUshort(sc, 0x06, 0x08f6);
15793                 MP_WritePhyUshort(sc, 0x06, 0x22e4);
15794                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15795                 MP_WritePhyUshort(sc, 0x06, 0x0235);
15796                 MP_WritePhyUshort(sc, 0x06, 0x63e0);
15797                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15798                 MP_WritePhyUshort(sc, 0x06, 0xad23);
15799                 MP_WritePhyUshort(sc, 0x06, 0x08f6);
15800                 MP_WritePhyUshort(sc, 0x06, 0x23e4);
15801                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15802                 MP_WritePhyUshort(sc, 0x06, 0x0231);
15803                 MP_WritePhyUshort(sc, 0x06, 0x57e0);
15804                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15805                 MP_WritePhyUshort(sc, 0x06, 0xad24);
15806                 MP_WritePhyUshort(sc, 0x06, 0x05f6);
15807                 MP_WritePhyUshort(sc, 0x06, 0x24e4);
15808                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15809                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15810                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
15811                 MP_WritePhyUshort(sc, 0x06, 0x2505);
15812                 MP_WritePhyUshort(sc, 0x06, 0xf625);
15813                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
15814                 MP_WritePhyUshort(sc, 0x06, 0x8ee0);
15815                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15816                 MP_WritePhyUshort(sc, 0x06, 0xad26);
15817                 MP_WritePhyUshort(sc, 0x06, 0x08f6);
15818                 MP_WritePhyUshort(sc, 0x06, 0x26e4);
15819                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15820                 MP_WritePhyUshort(sc, 0x06, 0x022d);
15821                 MP_WritePhyUshort(sc, 0x06, 0x1ce0);
15822                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15823                 MP_WritePhyUshort(sc, 0x06, 0xad27);
15824                 MP_WritePhyUshort(sc, 0x06, 0x05f6);
15825                 MP_WritePhyUshort(sc, 0x06, 0x27e4);
15826                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
15827                 MP_WritePhyUshort(sc, 0x06, 0x0203);
15828                 MP_WritePhyUshort(sc, 0x06, 0x80fc);
15829                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
15830                 MP_WritePhyUshort(sc, 0x06, 0xf9e0);
15831                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
15832                 MP_WritePhyUshort(sc, 0x06, 0xac26);
15833                 MP_WritePhyUshort(sc, 0x06, 0x1ae0);
15834                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
15835                 MP_WritePhyUshort(sc, 0x06, 0xac21);
15836                 MP_WritePhyUshort(sc, 0x06, 0x14e0);
15837                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
15838                 MP_WritePhyUshort(sc, 0x06, 0xac20);
15839                 MP_WritePhyUshort(sc, 0x06, 0x0ee0);
15840                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
15841                 MP_WritePhyUshort(sc, 0x06, 0xac23);
15842                 MP_WritePhyUshort(sc, 0x06, 0x08e0);
15843                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
15844                 MP_WritePhyUshort(sc, 0x06, 0xac24);
15845                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
15846                 MP_WritePhyUshort(sc, 0x06, 0x3802);
15847                 MP_WritePhyUshort(sc, 0x06, 0x1ac2);
15848                 MP_WritePhyUshort(sc, 0x06, 0xeee4);
15849                 MP_WritePhyUshort(sc, 0x06, 0x1c04);
15850                 MP_WritePhyUshort(sc, 0x06, 0xeee4);
15851                 MP_WritePhyUshort(sc, 0x06, 0x1d04);
15852                 MP_WritePhyUshort(sc, 0x06, 0xe2e0);
15853                 MP_WritePhyUshort(sc, 0x06, 0x7ce3);
15854                 MP_WritePhyUshort(sc, 0x06, 0xe07d);
15855                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
15856                 MP_WritePhyUshort(sc, 0x06, 0x38e1);
15857                 MP_WritePhyUshort(sc, 0x06, 0xe039);
15858                 MP_WritePhyUshort(sc, 0x06, 0xad2e);
15859                 MP_WritePhyUshort(sc, 0x06, 0x1bad);
15860                 MP_WritePhyUshort(sc, 0x06, 0x390d);
15861                 MP_WritePhyUshort(sc, 0x06, 0xd101);
15862                 MP_WritePhyUshort(sc, 0x06, 0xbf22);
15863                 MP_WritePhyUshort(sc, 0x06, 0x7a02);
15864                 MP_WritePhyUshort(sc, 0x06, 0x387d);
15865                 MP_WritePhyUshort(sc, 0x06, 0x0281);
15866                 MP_WritePhyUshort(sc, 0x06, 0xacae);
15867                 MP_WritePhyUshort(sc, 0x06, 0x0bac);
15868                 MP_WritePhyUshort(sc, 0x06, 0x3802);
15869                 MP_WritePhyUshort(sc, 0x06, 0xae06);
15870                 MP_WritePhyUshort(sc, 0x06, 0x0281);
15871                 MP_WritePhyUshort(sc, 0x06, 0xe902);
15872                 MP_WritePhyUshort(sc, 0x06, 0x822e);
15873                 MP_WritePhyUshort(sc, 0x06, 0x021a);
15874                 MP_WritePhyUshort(sc, 0x06, 0xd3fd);
15875                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
15876                 MP_WritePhyUshort(sc, 0x06, 0xf8e1);
15877                 MP_WritePhyUshort(sc, 0x06, 0x8af4);
15878                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15879                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
15880                 MP_WritePhyUshort(sc, 0x06, 0x2602);
15881                 MP_WritePhyUshort(sc, 0x06, 0xf728);
15882                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15883                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
15884                 MP_WritePhyUshort(sc, 0x06, 0x2105);
15885                 MP_WritePhyUshort(sc, 0x06, 0x0222);
15886                 MP_WritePhyUshort(sc, 0x06, 0x8ef7);
15887                 MP_WritePhyUshort(sc, 0x06, 0x29e0);
15888                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
15889                 MP_WritePhyUshort(sc, 0x06, 0xad20);
15890                 MP_WritePhyUshort(sc, 0x06, 0x0502);
15891                 MP_WritePhyUshort(sc, 0x06, 0x14b8);
15892                 MP_WritePhyUshort(sc, 0x06, 0xf72a);
15893                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15894                 MP_WritePhyUshort(sc, 0x06, 0x85ad);
15895                 MP_WritePhyUshort(sc, 0x06, 0x2305);
15896                 MP_WritePhyUshort(sc, 0x06, 0x0212);
15897                 MP_WritePhyUshort(sc, 0x06, 0xf4f7);
15898                 MP_WritePhyUshort(sc, 0x06, 0x2be0);
15899                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
15900                 MP_WritePhyUshort(sc, 0x06, 0xad24);
15901                 MP_WritePhyUshort(sc, 0x06, 0x0502);
15902                 MP_WritePhyUshort(sc, 0x06, 0x8284);
15903                 MP_WritePhyUshort(sc, 0x06, 0xf72c);
15904                 MP_WritePhyUshort(sc, 0x06, 0xe58a);
15905                 MP_WritePhyUshort(sc, 0x06, 0xf4fc);
15906                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
15907                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15908                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
15909                 MP_WritePhyUshort(sc, 0x06, 0x2600);
15910                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15911                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
15912                 MP_WritePhyUshort(sc, 0x06, 0x2109);
15913                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
15914                 MP_WritePhyUshort(sc, 0x06, 0xf4ac);
15915                 MP_WritePhyUshort(sc, 0x06, 0x2003);
15916                 MP_WritePhyUshort(sc, 0x06, 0x0222);
15917                 MP_WritePhyUshort(sc, 0x06, 0x7de0);
15918                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
15919                 MP_WritePhyUshort(sc, 0x06, 0xad20);
15920                 MP_WritePhyUshort(sc, 0x06, 0x09e0);
15921                 MP_WritePhyUshort(sc, 0x06, 0x8af4);
15922                 MP_WritePhyUshort(sc, 0x06, 0xac21);
15923                 MP_WritePhyUshort(sc, 0x06, 0x0302);
15924                 MP_WritePhyUshort(sc, 0x06, 0x1408);
15925                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15926                 MP_WritePhyUshort(sc, 0x06, 0x85ad);
15927                 MP_WritePhyUshort(sc, 0x06, 0x2309);
15928                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
15929                 MP_WritePhyUshort(sc, 0x06, 0xf4ac);
15930                 MP_WritePhyUshort(sc, 0x06, 0x2203);
15931                 MP_WritePhyUshort(sc, 0x06, 0x0213);
15932                 MP_WritePhyUshort(sc, 0x06, 0x07e0);
15933                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
15934                 MP_WritePhyUshort(sc, 0x06, 0xad24);
15935                 MP_WritePhyUshort(sc, 0x06, 0x09e0);
15936                 MP_WritePhyUshort(sc, 0x06, 0x8af4);
15937                 MP_WritePhyUshort(sc, 0x06, 0xac23);
15938                 MP_WritePhyUshort(sc, 0x06, 0x0302);
15939                 MP_WritePhyUshort(sc, 0x06, 0x8289);
15940                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
15941                 MP_WritePhyUshort(sc, 0x06, 0xf8e1);
15942                 MP_WritePhyUshort(sc, 0x06, 0x8af4);
15943                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15944                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
15945                 MP_WritePhyUshort(sc, 0x06, 0x2602);
15946                 MP_WritePhyUshort(sc, 0x06, 0xf628);
15947                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15948                 MP_WritePhyUshort(sc, 0x06, 0x81ad);
15949                 MP_WritePhyUshort(sc, 0x06, 0x210a);
15950                 MP_WritePhyUshort(sc, 0x06, 0xe083);
15951                 MP_WritePhyUshort(sc, 0x06, 0xecf6);
15952                 MP_WritePhyUshort(sc, 0x06, 0x27a0);
15953                 MP_WritePhyUshort(sc, 0x06, 0x0502);
15954                 MP_WritePhyUshort(sc, 0x06, 0xf629);
15955                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15956                 MP_WritePhyUshort(sc, 0x06, 0x85ad);
15957                 MP_WritePhyUshort(sc, 0x06, 0x2008);
15958                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
15959                 MP_WritePhyUshort(sc, 0x06, 0xe8ad);
15960                 MP_WritePhyUshort(sc, 0x06, 0x2102);
15961                 MP_WritePhyUshort(sc, 0x06, 0xf62a);
15962                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15963                 MP_WritePhyUshort(sc, 0x06, 0x85ad);
15964                 MP_WritePhyUshort(sc, 0x06, 0x2308);
15965                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15966                 MP_WritePhyUshort(sc, 0x06, 0x20a0);
15967                 MP_WritePhyUshort(sc, 0x06, 0x0302);
15968                 MP_WritePhyUshort(sc, 0x06, 0xf62b);
15969                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15970                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
15971                 MP_WritePhyUshort(sc, 0x06, 0x2408);
15972                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
15973                 MP_WritePhyUshort(sc, 0x06, 0xc2a0);
15974                 MP_WritePhyUshort(sc, 0x06, 0x0302);
15975                 MP_WritePhyUshort(sc, 0x06, 0xf62c);
15976                 MP_WritePhyUshort(sc, 0x06, 0xe58a);
15977                 MP_WritePhyUshort(sc, 0x06, 0xf4a1);
15978                 MP_WritePhyUshort(sc, 0x06, 0x0008);
15979                 MP_WritePhyUshort(sc, 0x06, 0xd100);
15980                 MP_WritePhyUshort(sc, 0x06, 0xbf22);
15981                 MP_WritePhyUshort(sc, 0x06, 0x7a02);
15982                 MP_WritePhyUshort(sc, 0x06, 0x387d);
15983                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
15984                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
15985                 MP_WritePhyUshort(sc, 0x06, 0xc200);
15986                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
15987                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
15988                 MP_WritePhyUshort(sc, 0x06, 0x87ad);
15989                 MP_WritePhyUshort(sc, 0x06, 0x241e);
15990                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
15991                 MP_WritePhyUshort(sc, 0x06, 0xc2a0);
15992                 MP_WritePhyUshort(sc, 0x06, 0x0005);
15993                 MP_WritePhyUshort(sc, 0x06, 0x0282);
15994                 MP_WritePhyUshort(sc, 0x06, 0xb0ae);
15995                 MP_WritePhyUshort(sc, 0x06, 0xf5a0);
15996                 MP_WritePhyUshort(sc, 0x06, 0x0105);
15997                 MP_WritePhyUshort(sc, 0x06, 0x0282);
15998                 MP_WritePhyUshort(sc, 0x06, 0xc0ae);
15999                 MP_WritePhyUshort(sc, 0x06, 0x0ba0);
16000                 MP_WritePhyUshort(sc, 0x06, 0x0205);
16001                 MP_WritePhyUshort(sc, 0x06, 0x0282);
16002                 MP_WritePhyUshort(sc, 0x06, 0xcaae);
16003                 MP_WritePhyUshort(sc, 0x06, 0x03a0);
16004                 MP_WritePhyUshort(sc, 0x06, 0x0300);
16005                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
16006                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
16007                 MP_WritePhyUshort(sc, 0x06, 0xef69);
16008                 MP_WritePhyUshort(sc, 0x06, 0x0282);
16009                 MP_WritePhyUshort(sc, 0x06, 0xe1ee);
16010                 MP_WritePhyUshort(sc, 0x06, 0x8ac2);
16011                 MP_WritePhyUshort(sc, 0x06, 0x01ef);
16012                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
16013                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
16014                 MP_WritePhyUshort(sc, 0x06, 0xf8ee);
16015                 MP_WritePhyUshort(sc, 0x06, 0x8ac9);
16016                 MP_WritePhyUshort(sc, 0x06, 0x0002);
16017                 MP_WritePhyUshort(sc, 0x06, 0x8317);
16018                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
16019                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
16020                 MP_WritePhyUshort(sc, 0x06, 0x8ac8);
16021                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
16022                 MP_WritePhyUshort(sc, 0x06, 0xc91f);
16023                 MP_WritePhyUshort(sc, 0x06, 0x019e);
16024                 MP_WritePhyUshort(sc, 0x06, 0x0611);
16025                 MP_WritePhyUshort(sc, 0x06, 0xe58a);
16026                 MP_WritePhyUshort(sc, 0x06, 0xc9ae);
16027                 MP_WritePhyUshort(sc, 0x06, 0x04ee);
16028                 MP_WritePhyUshort(sc, 0x06, 0x8ac2);
16029                 MP_WritePhyUshort(sc, 0x06, 0x01fc);
16030                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
16031                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
16032                 MP_WritePhyUshort(sc, 0x06, 0xef69);
16033                 MP_WritePhyUshort(sc, 0x06, 0xfbbf);
16034                 MP_WritePhyUshort(sc, 0x06, 0x8ac4);
16035                 MP_WritePhyUshort(sc, 0x06, 0xef79);
16036                 MP_WritePhyUshort(sc, 0x06, 0xd200);
16037                 MP_WritePhyUshort(sc, 0x06, 0xd400);
16038                 MP_WritePhyUshort(sc, 0x06, 0x221e);
16039                 MP_WritePhyUshort(sc, 0x06, 0x02bf);
16040                 MP_WritePhyUshort(sc, 0x06, 0x3024);
16041                 MP_WritePhyUshort(sc, 0x06, 0x0238);
16042                 MP_WritePhyUshort(sc, 0x06, 0x7dbf);
16043                 MP_WritePhyUshort(sc, 0x06, 0x13ff);
16044                 MP_WritePhyUshort(sc, 0x06, 0x0238);
16045                 MP_WritePhyUshort(sc, 0x06, 0x500d);
16046                 MP_WritePhyUshort(sc, 0x06, 0x4559);
16047                 MP_WritePhyUshort(sc, 0x06, 0x1fef);
16048                 MP_WritePhyUshort(sc, 0x06, 0x97dd);
16049                 MP_WritePhyUshort(sc, 0x06, 0xd308);
16050                 MP_WritePhyUshort(sc, 0x06, 0x1a93);
16051                 MP_WritePhyUshort(sc, 0x06, 0xdd12);
16052                 MP_WritePhyUshort(sc, 0x06, 0x17a2);
16053                 MP_WritePhyUshort(sc, 0x06, 0x04de);
16054                 MP_WritePhyUshort(sc, 0x06, 0xffef);
16055                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
16056                 MP_WritePhyUshort(sc, 0x06, 0xfdfc);
16057                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
16058                 MP_WritePhyUshort(sc, 0x06, 0xf9fa);
16059                 MP_WritePhyUshort(sc, 0x06, 0xef69);
16060                 MP_WritePhyUshort(sc, 0x06, 0xfbee);
16061                 MP_WritePhyUshort(sc, 0x06, 0x8ac2);
16062                 MP_WritePhyUshort(sc, 0x06, 0x03d5);
16063                 MP_WritePhyUshort(sc, 0x06, 0x0080);
16064                 MP_WritePhyUshort(sc, 0x06, 0xbf8a);
16065                 MP_WritePhyUshort(sc, 0x06, 0xc4ef);
16066                 MP_WritePhyUshort(sc, 0x06, 0x79ef);
16067                 MP_WritePhyUshort(sc, 0x06, 0x45bf);
16068                 MP_WritePhyUshort(sc, 0x06, 0x3024);
16069                 MP_WritePhyUshort(sc, 0x06, 0x0238);
16070                 MP_WritePhyUshort(sc, 0x06, 0x7dbf);
16071                 MP_WritePhyUshort(sc, 0x06, 0x13ff);
16072                 MP_WritePhyUshort(sc, 0x06, 0x0238);
16073                 MP_WritePhyUshort(sc, 0x06, 0x50ad);
16074                 MP_WritePhyUshort(sc, 0x06, 0x2702);
16075                 MP_WritePhyUshort(sc, 0x06, 0x78ff);
16076                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
16077                 MP_WritePhyUshort(sc, 0x06, 0xca1b);
16078                 MP_WritePhyUshort(sc, 0x06, 0x01aa);
16079                 MP_WritePhyUshort(sc, 0x06, 0x2eef);
16080                 MP_WritePhyUshort(sc, 0x06, 0x97d9);
16081                 MP_WritePhyUshort(sc, 0x06, 0x7900);
16082                 MP_WritePhyUshort(sc, 0x06, 0x9e2b);
16083                 MP_WritePhyUshort(sc, 0x06, 0x81dd);
16084                 MP_WritePhyUshort(sc, 0x06, 0xbf85);
16085                 MP_WritePhyUshort(sc, 0x06, 0xad02);
16086                 MP_WritePhyUshort(sc, 0x06, 0x387d);
16087                 MP_WritePhyUshort(sc, 0x06, 0xd101);
16088                 MP_WritePhyUshort(sc, 0x06, 0xef02);
16089                 MP_WritePhyUshort(sc, 0x06, 0x100c);
16090                 MP_WritePhyUshort(sc, 0x06, 0x11b0);
16091                 MP_WritePhyUshort(sc, 0x06, 0xfc0d);
16092                 MP_WritePhyUshort(sc, 0x06, 0x11bf);
16093                 MP_WritePhyUshort(sc, 0x06, 0x85aa);
16094                 MP_WritePhyUshort(sc, 0x06, 0x0238);
16095                 MP_WritePhyUshort(sc, 0x06, 0x7dd1);
16096                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
16097                 MP_WritePhyUshort(sc, 0x06, 0x85aa);
16098                 MP_WritePhyUshort(sc, 0x06, 0x0238);
16099                 MP_WritePhyUshort(sc, 0x06, 0x7dee);
16100                 MP_WritePhyUshort(sc, 0x06, 0x8ac2);
16101                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
16102                 MP_WritePhyUshort(sc, 0x06, 0x0413);
16103                 MP_WritePhyUshort(sc, 0x06, 0xa38b);
16104                 MP_WritePhyUshort(sc, 0x06, 0xb4d3);
16105                 MP_WritePhyUshort(sc, 0x06, 0x8012);
16106                 MP_WritePhyUshort(sc, 0x06, 0x17a2);
16107                 MP_WritePhyUshort(sc, 0x06, 0x04ad);
16108                 MP_WritePhyUshort(sc, 0x06, 0xffef);
16109                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
16110                 MP_WritePhyUshort(sc, 0x06, 0xfdfc);
16111                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
16112                 MP_WritePhyUshort(sc, 0x06, 0xf9e0);
16113                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
16114                 MP_WritePhyUshort(sc, 0x06, 0xad25);
16115                 MP_WritePhyUshort(sc, 0x06, 0x48e0);
16116                 MP_WritePhyUshort(sc, 0x06, 0x8a96);
16117                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
16118                 MP_WritePhyUshort(sc, 0x06, 0x977c);
16119                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16120                 MP_WritePhyUshort(sc, 0x06, 0x9e35);
16121                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
16122                 MP_WritePhyUshort(sc, 0x06, 0x9600);
16123                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
16124                 MP_WritePhyUshort(sc, 0x06, 0x9700);
16125                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
16126                 MP_WritePhyUshort(sc, 0x06, 0xbee1);
16127                 MP_WritePhyUshort(sc, 0x06, 0x8abf);
16128                 MP_WritePhyUshort(sc, 0x06, 0xe28a);
16129                 MP_WritePhyUshort(sc, 0x06, 0xc0e3);
16130                 MP_WritePhyUshort(sc, 0x06, 0x8ac1);
16131                 MP_WritePhyUshort(sc, 0x06, 0x0237);
16132                 MP_WritePhyUshort(sc, 0x06, 0x74ad);
16133                 MP_WritePhyUshort(sc, 0x06, 0x2012);
16134                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
16135                 MP_WritePhyUshort(sc, 0x06, 0x9603);
16136                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
16137                 MP_WritePhyUshort(sc, 0x06, 0x97b7);
16138                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
16139                 MP_WritePhyUshort(sc, 0x06, 0xc000);
16140                 MP_WritePhyUshort(sc, 0x06, 0xee8a);
16141                 MP_WritePhyUshort(sc, 0x06, 0xc100);
16142                 MP_WritePhyUshort(sc, 0x06, 0xae11);
16143                 MP_WritePhyUshort(sc, 0x06, 0x15e6);
16144                 MP_WritePhyUshort(sc, 0x06, 0x8ac0);
16145                 MP_WritePhyUshort(sc, 0x06, 0xe78a);
16146                 MP_WritePhyUshort(sc, 0x06, 0xc1ae);
16147                 MP_WritePhyUshort(sc, 0x06, 0x08ee);
16148                 MP_WritePhyUshort(sc, 0x06, 0x8ac0);
16149                 MP_WritePhyUshort(sc, 0x06, 0x00ee);
16150                 MP_WritePhyUshort(sc, 0x06, 0x8ac1);
16151                 MP_WritePhyUshort(sc, 0x06, 0x00fd);
16152                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
16153                 MP_WritePhyUshort(sc, 0x06, 0xae20);
16154                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16155                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16156                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16157                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16158                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16159                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16160                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16161                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16162                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16163                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16164                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16165                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16166                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16167                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16168                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16169                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16170                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
16171                 MP_WritePhyUshort(sc, 0x06, 0xef69);
16172                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
16173                 MP_WritePhyUshort(sc, 0x06, 0x00e1);
16174                 MP_WritePhyUshort(sc, 0x06, 0xe001);
16175                 MP_WritePhyUshort(sc, 0x06, 0xad27);
16176                 MP_WritePhyUshort(sc, 0x06, 0x32e0);
16177                 MP_WritePhyUshort(sc, 0x06, 0x8b40);
16178                 MP_WritePhyUshort(sc, 0x06, 0xf720);
16179                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
16180                 MP_WritePhyUshort(sc, 0x06, 0x40bf);
16181                 MP_WritePhyUshort(sc, 0x06, 0x3230);
16182                 MP_WritePhyUshort(sc, 0x06, 0x0238);
16183                 MP_WritePhyUshort(sc, 0x06, 0x50ad);
16184                 MP_WritePhyUshort(sc, 0x06, 0x2821);
16185                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
16186                 MP_WritePhyUshort(sc, 0x06, 0x20e1);
16187                 MP_WritePhyUshort(sc, 0x06, 0xe021);
16188                 MP_WritePhyUshort(sc, 0x06, 0xad20);
16189                 MP_WritePhyUshort(sc, 0x06, 0x18e0);
16190                 MP_WritePhyUshort(sc, 0x06, 0x8b40);
16191                 MP_WritePhyUshort(sc, 0x06, 0xf620);
16192                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
16193                 MP_WritePhyUshort(sc, 0x06, 0x40ee);
16194                 MP_WritePhyUshort(sc, 0x06, 0x8b3b);
16195                 MP_WritePhyUshort(sc, 0x06, 0xffe0);
16196                 MP_WritePhyUshort(sc, 0x06, 0x8a8a);
16197                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
16198                 MP_WritePhyUshort(sc, 0x06, 0x8be4);
16199                 MP_WritePhyUshort(sc, 0x06, 0xe000);
16200                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
16201                 MP_WritePhyUshort(sc, 0x06, 0x01ef);
16202                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
16203                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
16204                 MP_WritePhyUshort(sc, 0x06, 0xf8f9);
16205                 MP_WritePhyUshort(sc, 0x06, 0xface);
16206                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
16207                 MP_WritePhyUshort(sc, 0x06, 0x69fa);
16208                 MP_WritePhyUshort(sc, 0x06, 0xd401);
16209                 MP_WritePhyUshort(sc, 0x06, 0x55b4);
16210                 MP_WritePhyUshort(sc, 0x06, 0xfebf);
16211                 MP_WritePhyUshort(sc, 0x06, 0x1c1e);
16212                 MP_WritePhyUshort(sc, 0x06, 0x0238);
16213                 MP_WritePhyUshort(sc, 0x06, 0x50ac);
16214                 MP_WritePhyUshort(sc, 0x06, 0x280b);
16215                 MP_WritePhyUshort(sc, 0x06, 0xbf1c);
16216                 MP_WritePhyUshort(sc, 0x06, 0x1b02);
16217                 MP_WritePhyUshort(sc, 0x06, 0x3850);
16218                 MP_WritePhyUshort(sc, 0x06, 0xac28);
16219                 MP_WritePhyUshort(sc, 0x06, 0x49ae);
16220                 MP_WritePhyUshort(sc, 0x06, 0x64bf);
16221                 MP_WritePhyUshort(sc, 0x06, 0x1c1b);
16222                 MP_WritePhyUshort(sc, 0x06, 0x0238);
16223                 MP_WritePhyUshort(sc, 0x06, 0x50ac);
16224                 MP_WritePhyUshort(sc, 0x06, 0x285b);
16225                 MP_WritePhyUshort(sc, 0x06, 0xd000);
16226                 MP_WritePhyUshort(sc, 0x06, 0x0284);
16227                 MP_WritePhyUshort(sc, 0x06, 0xcaac);
16228                 MP_WritePhyUshort(sc, 0x06, 0x2105);
16229                 MP_WritePhyUshort(sc, 0x06, 0xac22);
16230                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
16231                 MP_WritePhyUshort(sc, 0x06, 0x4ebf);
16232                 MP_WritePhyUshort(sc, 0x06, 0xe0c4);
16233                 MP_WritePhyUshort(sc, 0x06, 0xbe85);
16234                 MP_WritePhyUshort(sc, 0x06, 0xf6d2);
16235                 MP_WritePhyUshort(sc, 0x06, 0x04d8);
16236                 MP_WritePhyUshort(sc, 0x06, 0x19d9);
16237                 MP_WritePhyUshort(sc, 0x06, 0x1907);
16238                 MP_WritePhyUshort(sc, 0x06, 0xdc19);
16239                 MP_WritePhyUshort(sc, 0x06, 0xdd19);
16240                 MP_WritePhyUshort(sc, 0x06, 0x0789);
16241                 MP_WritePhyUshort(sc, 0x06, 0x89ef);
16242                 MP_WritePhyUshort(sc, 0x06, 0x645e);
16243                 MP_WritePhyUshort(sc, 0x06, 0x07ff);
16244                 MP_WritePhyUshort(sc, 0x06, 0x0d65);
16245                 MP_WritePhyUshort(sc, 0x06, 0x5cf8);
16246                 MP_WritePhyUshort(sc, 0x06, 0x001e);
16247                 MP_WritePhyUshort(sc, 0x06, 0x46dc);
16248                 MP_WritePhyUshort(sc, 0x06, 0x19dd);
16249                 MP_WritePhyUshort(sc, 0x06, 0x19b2);
16250                 MP_WritePhyUshort(sc, 0x06, 0xe2d4);
16251                 MP_WritePhyUshort(sc, 0x06, 0x0001);
16252                 MP_WritePhyUshort(sc, 0x06, 0xbf1c);
16253                 MP_WritePhyUshort(sc, 0x06, 0x1b02);
16254                 MP_WritePhyUshort(sc, 0x06, 0x387d);
16255                 MP_WritePhyUshort(sc, 0x06, 0xae1d);
16256                 MP_WritePhyUshort(sc, 0x06, 0xbee0);
16257                 MP_WritePhyUshort(sc, 0x06, 0xc4bf);
16258                 MP_WritePhyUshort(sc, 0x06, 0x85f6);
16259                 MP_WritePhyUshort(sc, 0x06, 0xd204);
16260                 MP_WritePhyUshort(sc, 0x06, 0xd819);
16261                 MP_WritePhyUshort(sc, 0x06, 0xd919);
16262                 MP_WritePhyUshort(sc, 0x06, 0x07dc);
16263                 MP_WritePhyUshort(sc, 0x06, 0x19dd);
16264                 MP_WritePhyUshort(sc, 0x06, 0x1907);
16265                 MP_WritePhyUshort(sc, 0x06, 0xb2f4);
16266                 MP_WritePhyUshort(sc, 0x06, 0xd400);
16267                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
16268                 MP_WritePhyUshort(sc, 0x06, 0x1c1b);
16269                 MP_WritePhyUshort(sc, 0x06, 0x0238);
16270                 MP_WritePhyUshort(sc, 0x06, 0x7dfe);
16271                 MP_WritePhyUshort(sc, 0x06, 0xef96);
16272                 MP_WritePhyUshort(sc, 0x06, 0xfec6);
16273                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
16274                 MP_WritePhyUshort(sc, 0x06, 0xfc05);
16275                 MP_WritePhyUshort(sc, 0x06, 0xf9e2);
16276                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
16277                 MP_WritePhyUshort(sc, 0x06, 0xe3e0);
16278                 MP_WritePhyUshort(sc, 0x06, 0xeb5a);
16279                 MP_WritePhyUshort(sc, 0x06, 0x070c);
16280                 MP_WritePhyUshort(sc, 0x06, 0x031e);
16281                 MP_WritePhyUshort(sc, 0x06, 0x20e6);
16282                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
16283                 MP_WritePhyUshort(sc, 0x06, 0xe7e0);
16284                 MP_WritePhyUshort(sc, 0x06, 0xebe0);
16285                 MP_WritePhyUshort(sc, 0x06, 0xe0fc);
16286                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
16287                 MP_WritePhyUshort(sc, 0x06, 0xfdfd);
16288                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
16289                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
16290                 MP_WritePhyUshort(sc, 0x06, 0x69e0);
16291                 MP_WritePhyUshort(sc, 0x06, 0x8b80);
16292                 MP_WritePhyUshort(sc, 0x06, 0xad27);
16293                 MP_WritePhyUshort(sc, 0x06, 0x22bf);
16294                 MP_WritePhyUshort(sc, 0x06, 0x4616);
16295                 MP_WritePhyUshort(sc, 0x06, 0x0238);
16296                 MP_WritePhyUshort(sc, 0x06, 0x50e0);
16297                 MP_WritePhyUshort(sc, 0x06, 0x8b44);
16298                 MP_WritePhyUshort(sc, 0x06, 0x1f01);
16299                 MP_WritePhyUshort(sc, 0x06, 0x9e15);
16300                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
16301                 MP_WritePhyUshort(sc, 0x06, 0x44ad);
16302                 MP_WritePhyUshort(sc, 0x06, 0x2907);
16303                 MP_WritePhyUshort(sc, 0x06, 0xac28);
16304                 MP_WritePhyUshort(sc, 0x06, 0x04d1);
16305                 MP_WritePhyUshort(sc, 0x06, 0x01ae);
16306                 MP_WritePhyUshort(sc, 0x06, 0x02d1);
16307                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
16308                 MP_WritePhyUshort(sc, 0x06, 0x85b0);
16309                 MP_WritePhyUshort(sc, 0x06, 0x0238);
16310                 MP_WritePhyUshort(sc, 0x06, 0x7def);
16311                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
16312                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
16313                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
16314                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
16315                 MP_WritePhyUshort(sc, 0x06, 0xad26);
16316                 MP_WritePhyUshort(sc, 0x06, 0x30e0);
16317                 MP_WritePhyUshort(sc, 0x06, 0xe036);
16318                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
16319                 MP_WritePhyUshort(sc, 0x06, 0x37e1);
16320                 MP_WritePhyUshort(sc, 0x06, 0x8b3f);
16321                 MP_WritePhyUshort(sc, 0x06, 0x1f10);
16322                 MP_WritePhyUshort(sc, 0x06, 0x9e23);
16323                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
16324                 MP_WritePhyUshort(sc, 0x06, 0x3fac);
16325                 MP_WritePhyUshort(sc, 0x06, 0x200b);
16326                 MP_WritePhyUshort(sc, 0x06, 0xac21);
16327                 MP_WritePhyUshort(sc, 0x06, 0x0dac);
16328                 MP_WritePhyUshort(sc, 0x06, 0x250f);
16329                 MP_WritePhyUshort(sc, 0x06, 0xac27);
16330                 MP_WritePhyUshort(sc, 0x06, 0x11ae);
16331                 MP_WritePhyUshort(sc, 0x06, 0x1202);
16332                 MP_WritePhyUshort(sc, 0x06, 0x2c47);
16333                 MP_WritePhyUshort(sc, 0x06, 0xae0d);
16334                 MP_WritePhyUshort(sc, 0x06, 0x0285);
16335                 MP_WritePhyUshort(sc, 0x06, 0x4fae);
16336                 MP_WritePhyUshort(sc, 0x06, 0x0802);
16337                 MP_WritePhyUshort(sc, 0x06, 0x2c69);
16338                 MP_WritePhyUshort(sc, 0x06, 0xae03);
16339                 MP_WritePhyUshort(sc, 0x06, 0x022c);
16340                 MP_WritePhyUshort(sc, 0x06, 0x7cfc);
16341                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
16342                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
16343                 MP_WritePhyUshort(sc, 0x06, 0x6902);
16344                 MP_WritePhyUshort(sc, 0x06, 0x856c);
16345                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
16346                 MP_WritePhyUshort(sc, 0x06, 0x14e1);
16347                 MP_WritePhyUshort(sc, 0x06, 0xe015);
16348                 MP_WritePhyUshort(sc, 0x06, 0xad26);
16349                 MP_WritePhyUshort(sc, 0x06, 0x08d1);
16350                 MP_WritePhyUshort(sc, 0x06, 0x1ebf);
16351                 MP_WritePhyUshort(sc, 0x06, 0x2cd9);
16352                 MP_WritePhyUshort(sc, 0x06, 0x0238);
16353                 MP_WritePhyUshort(sc, 0x06, 0x7def);
16354                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
16355                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
16356                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
16357                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
16358                 MP_WritePhyUshort(sc, 0x06, 0xad27);
16359                 MP_WritePhyUshort(sc, 0x06, 0x2fd0);
16360                 MP_WritePhyUshort(sc, 0x06, 0x0b02);
16361                 MP_WritePhyUshort(sc, 0x06, 0x3682);
16362                 MP_WritePhyUshort(sc, 0x06, 0x5882);
16363                 MP_WritePhyUshort(sc, 0x06, 0x7882);
16364                 MP_WritePhyUshort(sc, 0x06, 0x9f24);
16365                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
16366                 MP_WritePhyUshort(sc, 0x06, 0x32e1);
16367                 MP_WritePhyUshort(sc, 0x06, 0x8b33);
16368                 MP_WritePhyUshort(sc, 0x06, 0x1f10);
16369                 MP_WritePhyUshort(sc, 0x06, 0x9e1a);
16370                 MP_WritePhyUshort(sc, 0x06, 0x10e4);
16371                 MP_WritePhyUshort(sc, 0x06, 0x8b32);
16372                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
16373                 MP_WritePhyUshort(sc, 0x06, 0x28e1);
16374                 MP_WritePhyUshort(sc, 0x06, 0xe029);
16375                 MP_WritePhyUshort(sc, 0x06, 0xf72c);
16376                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
16377                 MP_WritePhyUshort(sc, 0x06, 0x28e5);
16378                 MP_WritePhyUshort(sc, 0x06, 0xe029);
16379                 MP_WritePhyUshort(sc, 0x06, 0xf62c);
16380                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
16381                 MP_WritePhyUshort(sc, 0x06, 0x28e5);
16382                 MP_WritePhyUshort(sc, 0x06, 0xe029);
16383                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
16384                 MP_WritePhyUshort(sc, 0x06, 0x00e1);
16385                 MP_WritePhyUshort(sc, 0x06, 0x4077);
16386                 MP_WritePhyUshort(sc, 0x06, 0xe140);
16387                 MP_WritePhyUshort(sc, 0x06, 0x52e0);
16388                 MP_WritePhyUshort(sc, 0x06, 0xeed9);
16389                 MP_WritePhyUshort(sc, 0x06, 0xe04c);
16390                 MP_WritePhyUshort(sc, 0x06, 0xbbe0);
16391                 MP_WritePhyUshort(sc, 0x06, 0x2a00);
16392                 MP_WritePhyUshort(sc, 0x05, 0xe142);
16393                 Data = MP_ReadPhyUshort(sc, 0x06);
16394                 Data |= BIT_0;
16395                 MP_WritePhyUshort(sc,0x06, Data);
16396                 MP_WritePhyUshort(sc, 0x05, 0xe140);
16397                 Data = MP_ReadPhyUshort(sc, 0x06);
16398                 Data |= BIT_0;
16399                 MP_WritePhyUshort(sc,0x06, Data);
16400                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16401                 MP_WritePhyUshort(sc,0x1f, 0x0005);
16402                 for (i = 0; i < 200; i++) {
16403                         DELAY(100);
16404                         Data = MP_ReadPhyUshort(sc, 0x00);
16405                         if (Data & BIT_7)
16406                                 break;
16407                 }
16408                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
16409                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
16410                 Data = MP_ReadPhyUshort(sc, 0x17);
16411                 Data |= BIT_1;
16412                 MP_WritePhyUshort(sc, 0x17, Data);
16413                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16414                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
16415                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
16416                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16417                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
16418                 MP_WritePhyUshort(sc, 0x01, 0x328A);
16419                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16420                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
16421                 Data = MP_ReadPhyUshort(sc, 0x19);
16422                 Data &= ~BIT_0;
16423                 MP_WritePhyUshort(sc, 0x19, Data);
16424                 Data = MP_ReadPhyUshort(sc, 0x10);
16425                 Data &= ~BIT_10;
16426                 MP_WritePhyUshort(sc, 0x10, Data);
16427                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16428                 MP_WritePhyUshort(sc, 0x00, 0x9200);
16429
16430                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
16431                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
16432                 Data = MP_ReadPhyUshort(sc, 0x06);
16433                 Data |= BIT_2 | BIT_1;
16434                 MP_WritePhyUshort(sc, 0x06, Data);
16435                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16436
16437                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
16438                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
16439                 Data = MP_ReadPhyUshort(sc, 0x18);
16440                 Data |= BIT_4;
16441                 MP_WritePhyUshort(sc, 0x18, Data);
16442                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16443                 Data = MP_ReadPhyUshort(sc, 0x14);
16444                 Data |= BIT_15;
16445                 MP_WritePhyUshort(sc, 0x14, Data);
16446
16447                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
16448                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
16449                 Data = MP_ReadPhyUshort(sc, 0x06);
16450                 Data |= BIT_0;
16451                 MP_WritePhyUshort(sc, 0x06, Data);
16452                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16453
16454                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
16455                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
16456                 Data = MP_ReadPhyUshort(sc, 0x06);
16457                 Data |= BIT_14;
16458                 MP_WritePhyUshort(sc, 0x06, Data);
16459                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16460
16461                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
16462                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
16463                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
16464
16465                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
16466                 MP_WritePhyUshort(sc, 0x05, 0x8B55);
16467                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16468                 MP_WritePhyUshort(sc, 0x05, 0x8B5E);
16469                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16470                 MP_WritePhyUshort(sc, 0x05, 0x8B67);
16471                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16472                 MP_WritePhyUshort(sc, 0x05, 0x8B70);
16473                 MP_WritePhyUshort(sc, 0x06, 0x0000);
16474                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16475                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
16476                 MP_WritePhyUshort(sc, 0x1E, 0x0078);
16477                 MP_WritePhyUshort(sc, 0x17, 0x0000);
16478                 MP_WritePhyUshort(sc, 0x19, 0x00FB);
16479                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16480
16481                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
16482                 MP_WritePhyUshort(sc, 0x05, 0x8B79);
16483                 MP_WritePhyUshort(sc, 0x06, 0xAA00);
16484                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16485
16486                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
16487                 MP_WritePhyUshort(sc, 0x01, 0x328A);
16488                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
16489
16490                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
16491                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
16492                 Data = MP_ReadPhyUshort(sc, 0x06);
16493                 Data &= ~BIT_11;
16494                 MP_WritePhyUshort(sc, 0x06, Data);
16495                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
16496                 Data = MP_ReadPhyUshort(sc, 0x06);
16497                 Data &= ~BIT_11;
16498                 MP_WritePhyUshort(sc, 0x06, Data);
16499                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
16500                 Data = MP_ReadPhyUshort(sc, 0x06);
16501                 Data &= ~BIT_8;
16502                 MP_WritePhyUshort(sc, 0x06, Data);
16503                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
16504                 Data = MP_ReadPhyUshort(sc, 0x06);
16505                 Data |= BIT_8;
16506                 MP_WritePhyUshort(sc, 0x06, Data);
16507                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
16508                 Data = MP_ReadPhyUshort(sc, 0x06);
16509                 Data &= ~BIT_8;
16510                 MP_WritePhyUshort(sc, 0x06, Data);
16511                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
16512                 Data = MP_ReadPhyUshort(sc, 0x06);
16513                 Data &= ~BIT_8;
16514                 MP_WritePhyUshort(sc, 0x06, Data);
16515                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
16516                 Data = MP_ReadPhyUshort(sc, 0x06);
16517                 Data &= ~BIT_8;
16518                 MP_WritePhyUshort(sc, 0x06, Data);
16519                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
16520
16521                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
16522                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
16523                 Data = MP_ReadPhyUshort(sc, 0x06);
16524                 Data |= BIT_15;
16525                 MP_WritePhyUshort(sc, 0x06, Data);
16526                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16527
16528                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
16529                 Data = MP_ReadPhyUshort(sc, 0x19);
16530                 Data &= ~BIT_0;
16531                 MP_WritePhyUshort(sc, 0x19, Data);
16532                 Data = MP_ReadPhyUshort(sc, 0x10);
16533                 Data &= ~BIT_10;
16534                 MP_WritePhyUshort(sc, 0x10, Data);
16535                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16536         } else if (sc->re_type == MACFG_51) {
16537                 MP_WritePhyUshort(sc,0x1f, 0x0000);
16538                 MP_WritePhyUshort(sc,0x00, 0x1800);
16539                 Data = MP_ReadPhyUshort(sc, 0x15);
16540                 Data &= ~(BIT_12);
16541                 MP_WritePhyUshort(sc,0x15, Data);
16542                 MP_WritePhyUshort(sc,0x00, 0x9800);
16543                 MP_WritePhyUshort(sc,0x1f, 0x0007);
16544                 MP_WritePhyUshort(sc,0x1e, 0x002f);
16545                 for (i = 0; i < 1000; i++) {
16546                         DELAY(100);
16547                         Data = MP_ReadPhyUshort(sc, 0x1c);
16548                         if (Data & BIT_7)
16549                                 break;
16550                 }
16551                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
16552                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
16553                 MP_WritePhyUshort(sc, 0x16, 0x0306);
16554                 MP_WritePhyUshort(sc, 0x16, 0x0307);
16555                 MP_WritePhyUshort(sc, 0x15, 0x0098);
16556                 MP_WritePhyUshort(sc, 0x19, 0x7c0b);
16557                 MP_WritePhyUshort(sc, 0x15, 0x0099);
16558                 MP_WritePhyUshort(sc, 0x19, 0x6c0b);
16559                 MP_WritePhyUshort(sc, 0x15, 0x00eb);
16560                 MP_WritePhyUshort(sc, 0x19, 0x6c0b);
16561                 MP_WritePhyUshort(sc, 0x15, 0x00f8);
16562                 MP_WritePhyUshort(sc, 0x19, 0x6f0b);
16563                 MP_WritePhyUshort(sc, 0x15, 0x00fe);
16564                 MP_WritePhyUshort(sc, 0x19, 0x6f0f);
16565                 MP_WritePhyUshort(sc, 0x15, 0x00db);
16566                 MP_WritePhyUshort(sc, 0x19, 0x6f09);
16567                 MP_WritePhyUshort(sc, 0x15, 0x00dc);
16568                 MP_WritePhyUshort(sc, 0x19, 0xaefd);
16569                 MP_WritePhyUshort(sc, 0x15, 0x00dd);
16570                 MP_WritePhyUshort(sc, 0x19, 0x6f0b);
16571                 MP_WritePhyUshort(sc, 0x15, 0x00de);
16572                 MP_WritePhyUshort(sc, 0x19, 0xc60b);
16573                 MP_WritePhyUshort(sc, 0x15, 0x00df);
16574                 MP_WritePhyUshort(sc, 0x19, 0x00fa);
16575                 MP_WritePhyUshort(sc, 0x15, 0x00e0);
16576                 MP_WritePhyUshort(sc, 0x19, 0x30e1);
16577                 MP_WritePhyUshort(sc, 0x15, 0x020c);
16578                 MP_WritePhyUshort(sc, 0x19, 0x3224);
16579                 MP_WritePhyUshort(sc, 0x15, 0x020e);
16580                 MP_WritePhyUshort(sc, 0x19, 0x9813);
16581                 MP_WritePhyUshort(sc, 0x15, 0x020f);
16582                 MP_WritePhyUshort(sc, 0x19, 0x7801);
16583                 MP_WritePhyUshort(sc, 0x15, 0x0210);
16584                 MP_WritePhyUshort(sc, 0x19, 0x930f);
16585                 MP_WritePhyUshort(sc, 0x15, 0x0211);
16586                 MP_WritePhyUshort(sc, 0x19, 0x9206);
16587                 MP_WritePhyUshort(sc, 0x15, 0x0212);
16588                 MP_WritePhyUshort(sc, 0x19, 0x4002);
16589                 MP_WritePhyUshort(sc, 0x15, 0x0213);
16590                 MP_WritePhyUshort(sc, 0x19, 0x7800);
16591                 MP_WritePhyUshort(sc, 0x15, 0x0214);
16592                 MP_WritePhyUshort(sc, 0x19, 0x588f);
16593                 MP_WritePhyUshort(sc, 0x15, 0x0215);
16594                 MP_WritePhyUshort(sc, 0x19, 0x5520);
16595                 MP_WritePhyUshort(sc, 0x15, 0x0216);
16596                 MP_WritePhyUshort(sc, 0x19, 0x3224);
16597                 MP_WritePhyUshort(sc, 0x15, 0x0217);
16598                 MP_WritePhyUshort(sc, 0x19, 0x4002);
16599                 MP_WritePhyUshort(sc, 0x15, 0x0218);
16600                 MP_WritePhyUshort(sc, 0x19, 0x7800);
16601                 MP_WritePhyUshort(sc, 0x15, 0x0219);
16602                 MP_WritePhyUshort(sc, 0x19, 0x588d);
16603                 MP_WritePhyUshort(sc, 0x15, 0x021a);
16604                 MP_WritePhyUshort(sc, 0x19, 0x5540);
16605                 MP_WritePhyUshort(sc, 0x15, 0x021b);
16606                 MP_WritePhyUshort(sc, 0x19, 0x9e03);
16607                 MP_WritePhyUshort(sc, 0x15, 0x021c);
16608                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
16609                 MP_WritePhyUshort(sc, 0x15, 0x021d);
16610                 MP_WritePhyUshort(sc, 0x19, 0x6840);
16611                 MP_WritePhyUshort(sc, 0x15, 0x021e);
16612                 MP_WritePhyUshort(sc, 0x19, 0x3224);
16613                 MP_WritePhyUshort(sc, 0x15, 0x021f);
16614                 MP_WritePhyUshort(sc, 0x19, 0x4002);
16615                 MP_WritePhyUshort(sc, 0x15, 0x0220);
16616                 MP_WritePhyUshort(sc, 0x19, 0x3224);
16617                 MP_WritePhyUshort(sc, 0x15, 0x0221);
16618                 MP_WritePhyUshort(sc, 0x19, 0x9e03);
16619                 MP_WritePhyUshort(sc, 0x15, 0x0222);
16620                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
16621                 MP_WritePhyUshort(sc, 0x15, 0x0223);
16622                 MP_WritePhyUshort(sc, 0x19, 0x6840);
16623                 MP_WritePhyUshort(sc, 0x15, 0x0224);
16624                 MP_WritePhyUshort(sc, 0x19, 0x7800);
16625                 MP_WritePhyUshort(sc, 0x15, 0x0225);
16626                 MP_WritePhyUshort(sc, 0x19, 0x3231);
16627                 MP_WritePhyUshort(sc, 0x15, 0x0000);
16628                 MP_WritePhyUshort(sc, 0x16, 0x0306);
16629                 MP_WritePhyUshort(sc, 0x16, 0x0300);
16630                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16631                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
16632                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
16633                 MP_WritePhyUshort(sc, 0x06, 0x0080);
16634                 MP_WritePhyUshort(sc, 0x05, 0x8000);
16635                 MP_WritePhyUshort(sc, 0x06, 0x0280);
16636                 MP_WritePhyUshort(sc, 0x06, 0x48f7);
16637                 MP_WritePhyUshort(sc, 0x06, 0x00e0);
16638                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
16639                 MP_WritePhyUshort(sc, 0x06, 0xa080);
16640                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
16641                 MP_WritePhyUshort(sc, 0x06, 0xf602);
16642                 MP_WritePhyUshort(sc, 0x06, 0x011b);
16643                 MP_WritePhyUshort(sc, 0x06, 0x0201);
16644                 MP_WritePhyUshort(sc, 0x06, 0x2802);
16645                 MP_WritePhyUshort(sc, 0x06, 0x0135);
16646                 MP_WritePhyUshort(sc, 0x06, 0x0201);
16647                 MP_WritePhyUshort(sc, 0x06, 0x4502);
16648                 MP_WritePhyUshort(sc, 0x06, 0x015f);
16649                 MP_WritePhyUshort(sc, 0x06, 0x0280);
16650                 MP_WritePhyUshort(sc, 0x06, 0x6b02);
16651                 MP_WritePhyUshort(sc, 0x06, 0x80e5);
16652                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
16653                 MP_WritePhyUshort(sc, 0x06, 0x88e1);
16654                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
16655                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
16656                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
16657                 MP_WritePhyUshort(sc, 0x06, 0x8a1e);
16658                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
16659                 MP_WritePhyUshort(sc, 0x06, 0x8b8b);
16660                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
16661                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
16662                 MP_WritePhyUshort(sc, 0x06, 0x8c1e);
16663                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
16664                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
16665                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
16666                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
16667                 MP_WritePhyUshort(sc, 0x06, 0x8e1e);
16668                 MP_WritePhyUshort(sc, 0x06, 0x01a0);
16669                 MP_WritePhyUshort(sc, 0x06, 0x00c7);
16670                 MP_WritePhyUshort(sc, 0x06, 0xaebb);
16671                 MP_WritePhyUshort(sc, 0x06, 0xbf8b);
16672                 MP_WritePhyUshort(sc, 0x06, 0x88ec);
16673                 MP_WritePhyUshort(sc, 0x06, 0x0019);
16674                 MP_WritePhyUshort(sc, 0x06, 0xa98b);
16675                 MP_WritePhyUshort(sc, 0x06, 0x90f9);
16676                 MP_WritePhyUshort(sc, 0x06, 0xeeff);
16677                 MP_WritePhyUshort(sc, 0x06, 0xf600);
16678                 MP_WritePhyUshort(sc, 0x06, 0xeeff);
16679                 MP_WritePhyUshort(sc, 0x06, 0xf7fe);
16680                 MP_WritePhyUshort(sc, 0x06, 0xd100);
16681                 MP_WritePhyUshort(sc, 0x06, 0xbf81);
16682                 MP_WritePhyUshort(sc, 0x06, 0x9802);
16683                 MP_WritePhyUshort(sc, 0x06, 0x39f3);
16684                 MP_WritePhyUshort(sc, 0x06, 0xd101);
16685                 MP_WritePhyUshort(sc, 0x06, 0xbf81);
16686                 MP_WritePhyUshort(sc, 0x06, 0x9b02);
16687                 MP_WritePhyUshort(sc, 0x06, 0x39f3);
16688                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
16689                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
16690                 MP_WritePhyUshort(sc, 0x06, 0x8dad);
16691                 MP_WritePhyUshort(sc, 0x06, 0x2014);
16692                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
16693                 MP_WritePhyUshort(sc, 0x06, 0x8d00);
16694                 MP_WritePhyUshort(sc, 0x06, 0xe08a);
16695                 MP_WritePhyUshort(sc, 0x06, 0x5a78);
16696                 MP_WritePhyUshort(sc, 0x06, 0x039e);
16697                 MP_WritePhyUshort(sc, 0x06, 0x0902);
16698                 MP_WritePhyUshort(sc, 0x06, 0x05fc);
16699                 MP_WritePhyUshort(sc, 0x06, 0x0280);
16700                 MP_WritePhyUshort(sc, 0x06, 0x8802);
16701                 MP_WritePhyUshort(sc, 0x06, 0x32dd);
16702                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
16703                 MP_WritePhyUshort(sc, 0x06, 0xf8f9);
16704                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
16705                 MP_WritePhyUshort(sc, 0x06, 0x81ac);
16706                 MP_WritePhyUshort(sc, 0x06, 0x261a);
16707                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
16708                 MP_WritePhyUshort(sc, 0x06, 0x81ac);
16709                 MP_WritePhyUshort(sc, 0x06, 0x2114);
16710                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
16711                 MP_WritePhyUshort(sc, 0x06, 0x85ac);
16712                 MP_WritePhyUshort(sc, 0x06, 0x200e);
16713                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
16714                 MP_WritePhyUshort(sc, 0x06, 0x85ac);
16715                 MP_WritePhyUshort(sc, 0x06, 0x2308);
16716                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
16717                 MP_WritePhyUshort(sc, 0x06, 0x87ac);
16718                 MP_WritePhyUshort(sc, 0x06, 0x2402);
16719                 MP_WritePhyUshort(sc, 0x06, 0xae38);
16720                 MP_WritePhyUshort(sc, 0x06, 0x021a);
16721                 MP_WritePhyUshort(sc, 0x06, 0xd6ee);
16722                 MP_WritePhyUshort(sc, 0x06, 0xe41c);
16723                 MP_WritePhyUshort(sc, 0x06, 0x04ee);
16724                 MP_WritePhyUshort(sc, 0x06, 0xe41d);
16725                 MP_WritePhyUshort(sc, 0x06, 0x04e2);
16726                 MP_WritePhyUshort(sc, 0x06, 0xe07c);
16727                 MP_WritePhyUshort(sc, 0x06, 0xe3e0);
16728                 MP_WritePhyUshort(sc, 0x06, 0x7de0);
16729                 MP_WritePhyUshort(sc, 0x06, 0xe038);
16730                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
16731                 MP_WritePhyUshort(sc, 0x06, 0x39ad);
16732                 MP_WritePhyUshort(sc, 0x06, 0x2e1b);
16733                 MP_WritePhyUshort(sc, 0x06, 0xad39);
16734                 MP_WritePhyUshort(sc, 0x06, 0x0dd1);
16735                 MP_WritePhyUshort(sc, 0x06, 0x01bf);
16736                 MP_WritePhyUshort(sc, 0x06, 0x22c8);
16737                 MP_WritePhyUshort(sc, 0x06, 0x0239);
16738                 MP_WritePhyUshort(sc, 0x06, 0xf302);
16739                 MP_WritePhyUshort(sc, 0x06, 0x21f0);
16740                 MP_WritePhyUshort(sc, 0x06, 0xae0b);
16741                 MP_WritePhyUshort(sc, 0x06, 0xac38);
16742                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
16743                 MP_WritePhyUshort(sc, 0x06, 0x0602);
16744                 MP_WritePhyUshort(sc, 0x06, 0x222d);
16745                 MP_WritePhyUshort(sc, 0x06, 0x0222);
16746                 MP_WritePhyUshort(sc, 0x06, 0x7202);
16747                 MP_WritePhyUshort(sc, 0x06, 0x1ae7);
16748                 MP_WritePhyUshort(sc, 0x06, 0xfdfc);
16749                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
16750                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
16751                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
16752                 MP_WritePhyUshort(sc, 0x06, 0x201a);
16753                 MP_WritePhyUshort(sc, 0x06, 0xf620);
16754                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
16755                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
16756                 MP_WritePhyUshort(sc, 0x06, 0x2afe);
16757                 MP_WritePhyUshort(sc, 0x06, 0x022c);
16758                 MP_WritePhyUshort(sc, 0x06, 0x5c02);
16759                 MP_WritePhyUshort(sc, 0x06, 0x03c5);
16760                 MP_WritePhyUshort(sc, 0x06, 0x0281);
16761                 MP_WritePhyUshort(sc, 0x06, 0x6702);
16762                 MP_WritePhyUshort(sc, 0x06, 0x2e4f);
16763                 MP_WritePhyUshort(sc, 0x06, 0x0204);
16764                 MP_WritePhyUshort(sc, 0x06, 0x8902);
16765                 MP_WritePhyUshort(sc, 0x06, 0x2f7a);
16766                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
16767                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
16768                 MP_WritePhyUshort(sc, 0x06, 0x210b);
16769                 MP_WritePhyUshort(sc, 0x06, 0xf621);
16770                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
16771                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
16772                 MP_WritePhyUshort(sc, 0x06, 0x0445);
16773                 MP_WritePhyUshort(sc, 0x06, 0x021c);
16774                 MP_WritePhyUshort(sc, 0x06, 0xb8e0);
16775                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16776                 MP_WritePhyUshort(sc, 0x06, 0xad22);
16777                 MP_WritePhyUshort(sc, 0x06, 0x08f6);
16778                 MP_WritePhyUshort(sc, 0x06, 0x22e4);
16779                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16780                 MP_WritePhyUshort(sc, 0x06, 0x0235);
16781                 MP_WritePhyUshort(sc, 0x06, 0xd4e0);
16782                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16783                 MP_WritePhyUshort(sc, 0x06, 0xad23);
16784                 MP_WritePhyUshort(sc, 0x06, 0x08f6);
16785                 MP_WritePhyUshort(sc, 0x06, 0x23e4);
16786                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16787                 MP_WritePhyUshort(sc, 0x06, 0x0231);
16788                 MP_WritePhyUshort(sc, 0x06, 0xc8e0);
16789                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16790                 MP_WritePhyUshort(sc, 0x06, 0xad24);
16791                 MP_WritePhyUshort(sc, 0x06, 0x05f6);
16792                 MP_WritePhyUshort(sc, 0x06, 0x24e4);
16793                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16794                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
16795                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
16796                 MP_WritePhyUshort(sc, 0x06, 0x2505);
16797                 MP_WritePhyUshort(sc, 0x06, 0xf625);
16798                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
16799                 MP_WritePhyUshort(sc, 0x06, 0x8ee0);
16800                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16801                 MP_WritePhyUshort(sc, 0x06, 0xad26);
16802                 MP_WritePhyUshort(sc, 0x06, 0x08f6);
16803                 MP_WritePhyUshort(sc, 0x06, 0x26e4);
16804                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16805                 MP_WritePhyUshort(sc, 0x06, 0x022d);
16806                 MP_WritePhyUshort(sc, 0x06, 0x6ae0);
16807                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16808                 MP_WritePhyUshort(sc, 0x06, 0xad27);
16809                 MP_WritePhyUshort(sc, 0x06, 0x05f6);
16810                 MP_WritePhyUshort(sc, 0x06, 0x27e4);
16811                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
16812                 MP_WritePhyUshort(sc, 0x06, 0x0203);
16813                 MP_WritePhyUshort(sc, 0x06, 0x8bfc);
16814                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
16815                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
16816                 MP_WritePhyUshort(sc, 0x06, 0x69e0);
16817                 MP_WritePhyUshort(sc, 0x06, 0x8b80);
16818                 MP_WritePhyUshort(sc, 0x06, 0xad27);
16819                 MP_WritePhyUshort(sc, 0x06, 0x22bf);
16820                 MP_WritePhyUshort(sc, 0x06, 0x479a);
16821                 MP_WritePhyUshort(sc, 0x06, 0x0239);
16822                 MP_WritePhyUshort(sc, 0x06, 0xc6e0);
16823                 MP_WritePhyUshort(sc, 0x06, 0x8b44);
16824                 MP_WritePhyUshort(sc, 0x06, 0x1f01);
16825                 MP_WritePhyUshort(sc, 0x06, 0x9e15);
16826                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
16827                 MP_WritePhyUshort(sc, 0x06, 0x44ad);
16828                 MP_WritePhyUshort(sc, 0x06, 0x2907);
16829                 MP_WritePhyUshort(sc, 0x06, 0xac28);
16830                 MP_WritePhyUshort(sc, 0x06, 0x04d1);
16831                 MP_WritePhyUshort(sc, 0x06, 0x01ae);
16832                 MP_WritePhyUshort(sc, 0x06, 0x02d1);
16833                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
16834                 MP_WritePhyUshort(sc, 0x06, 0x819e);
16835                 MP_WritePhyUshort(sc, 0x06, 0x0239);
16836                 MP_WritePhyUshort(sc, 0x06, 0xf3ef);
16837                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
16838                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
16839                 MP_WritePhyUshort(sc, 0x06, 0x00e1);
16840                 MP_WritePhyUshort(sc, 0x06, 0x4077);
16841                 MP_WritePhyUshort(sc, 0x06, 0xe140);
16842                 MP_WritePhyUshort(sc, 0x06, 0xbbe0);
16843                 MP_WritePhyUshort(sc, 0x06, 0x2a00);
16844                 MP_WritePhyUshort(sc, 0x05, 0xe142);
16845                 Data = MP_ReadPhyUshort(sc, 0x06);
16846                 Data |= BIT_0;
16847                 MP_WritePhyUshort(sc, 0x06, Data);
16848                 MP_WritePhyUshort(sc, 0x05, 0xe140);
16849                 Data = MP_ReadPhyUshort(sc, 0x06);
16850                 Data |= BIT_0;
16851                 MP_WritePhyUshort(sc, 0x06, Data);
16852                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16853                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
16854                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
16855                 Data = MP_ReadPhyUshort(sc, 0x17);
16856                 Data |= BIT_1;
16857                 MP_WritePhyUshort(sc, 0x17, Data);
16858                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16859                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
16860                 Data = MP_ReadPhyUshort(sc, 0x19);
16861                 Data &= ~BIT_0;
16862                 MP_WritePhyUshort(sc, 0x19, Data);
16863                 Data = MP_ReadPhyUshort(sc, 0x10);
16864                 Data &= ~BIT_10;
16865                 MP_WritePhyUshort(sc, 0x10, Data);
16866                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16867                 MP_WritePhyUshort(sc, 0x00, 0x9200);
16868
16869                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
16870                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
16871                 Data = MP_ReadPhyUshort(sc, 0x06);
16872                 Data |= BIT_2 | BIT_1;
16873                 MP_WritePhyUshort(sc, 0x06, Data);
16874                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16875
16876                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
16877                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
16878                 Data = MP_ReadPhyUshort(sc, 0x18);
16879                 Data |= BIT_4;
16880                 MP_WritePhyUshort(sc, 0x18, Data);
16881                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16882                 Data = MP_ReadPhyUshort(sc, 0x14);
16883                 Data |= BIT_15;
16884                 MP_WritePhyUshort(sc, 0x14, Data);
16885
16886                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
16887                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
16888                 Data = MP_ReadPhyUshort(sc, 0x06);
16889                 Data |= BIT_0;
16890                 MP_WritePhyUshort(sc, 0x06, Data);
16891                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16892
16893                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
16894                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
16895                 Data = MP_ReadPhyUshort(sc, 0x06);
16896                 Data &= ~BIT_11;
16897                 MP_WritePhyUshort(sc, 0x06, Data);
16898                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
16899                 Data = MP_ReadPhyUshort(sc, 0x06);
16900                 Data &= ~BIT_11;
16901                 MP_WritePhyUshort(sc, 0x06, Data);
16902                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
16903                 Data = MP_ReadPhyUshort(sc, 0x06);
16904                 Data &= ~BIT_8;
16905                 MP_WritePhyUshort(sc, 0x06, Data);
16906                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
16907                 Data = MP_ReadPhyUshort(sc, 0x06);
16908                 Data |= BIT_8;
16909                 MP_WritePhyUshort(sc, 0x06, Data);
16910                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
16911                 Data = MP_ReadPhyUshort(sc, 0x06);
16912                 Data &= ~BIT_8;
16913                 MP_WritePhyUshort(sc, 0x06, Data);
16914                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
16915                 Data = MP_ReadPhyUshort(sc, 0x06);
16916                 Data &= ~BIT_8;
16917                 MP_WritePhyUshort(sc, 0x06, Data);
16918                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
16919                 Data = MP_ReadPhyUshort(sc, 0x06);
16920                 Data &= ~BIT_8;
16921                 MP_WritePhyUshort(sc, 0x06, Data);
16922                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
16923
16924                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
16925                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
16926                 Data = MP_ReadPhyUshort(sc, 0x06);
16927                 Data |= BIT_15;
16928                 MP_WritePhyUshort(sc, 0x06, Data);
16929                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16930
16931                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
16932                 Data = MP_ReadPhyUshort(sc, 0x19);
16933                 Data &= ~BIT_0;
16934                 MP_WritePhyUshort(sc, 0x19, Data);
16935                 Data = MP_ReadPhyUshort(sc, 0x10);
16936                 Data &= ~BIT_10;
16937                 MP_WritePhyUshort(sc, 0x10, Data);
16938                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
16939         } else if (sc->re_type == MACFG_52) {
16940                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
16941                 Data_u32 &= ~BIT_1;
16942                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
16943
16944                 MP_WritePhyUshort(sc,0x1f, 0x0000);
16945                 MP_WritePhyUshort(sc,0x00, 0x1800);
16946                 Data = MP_ReadPhyUshort(sc, 0x15);
16947                 Data &= ~(BIT_12);
16948                 MP_WritePhyUshort(sc,0x15, Data);
16949                 MP_WritePhyUshort(sc,0x00, 0x4800);
16950                 MP_WritePhyUshort(sc,0x1f, 0x0007);
16951                 MP_WritePhyUshort(sc,0x1e, 0x002f);
16952                 for (i = 0; i < 1000; i++) {
16953                         DELAY(100);
16954                         Data = MP_ReadPhyUshort(sc, 0x1c);
16955                         if (Data & BIT_7)
16956                                 break;
16957                 }
16958                 MP_WritePhyUshort(sc,0x1f, 0x0000);
16959                 MP_WritePhyUshort(sc,0x00, 0x1800);
16960                 MP_WritePhyUshort(sc,0x1f, 0x0007);
16961                 MP_WritePhyUshort(sc,0x1e, 0x0023);
16962                 for (i = 0; i < 200; i++) {
16963                         DELAY(100);
16964                         Data = MP_ReadPhyUshort(sc, 0x18);
16965                         if (!(Data & BIT_0))
16966                                 break;
16967                 }
16968                 MP_WritePhyUshort(sc,0x1f, 0x0005);
16969                 MP_WritePhyUshort(sc,0x05, 0xfff6);
16970                 MP_WritePhyUshort(sc,0x06, 0x0080);
16971                 MP_WritePhyUshort(sc, 0x1f, 0x0007);
16972                 MP_WritePhyUshort(sc, 0x1e, 0x0023);
16973                 MP_WritePhyUshort(sc, 0x16, 0x0306);
16974                 MP_WritePhyUshort(sc, 0x16, 0x0307);
16975                 MP_WritePhyUshort(sc, 0x15, 0x0098);
16976                 MP_WritePhyUshort(sc, 0x19, 0x7c0b);
16977                 MP_WritePhyUshort(sc, 0x15, 0x0099);
16978                 MP_WritePhyUshort(sc, 0x19, 0x6c0b);
16979                 MP_WritePhyUshort(sc, 0x15, 0x00eb);
16980                 MP_WritePhyUshort(sc, 0x19, 0x6c0b);
16981                 MP_WritePhyUshort(sc, 0x15, 0x00f8);
16982                 MP_WritePhyUshort(sc, 0x19, 0x6f0b);
16983                 MP_WritePhyUshort(sc, 0x15, 0x00fe);
16984                 MP_WritePhyUshort(sc, 0x19, 0x6f0f);
16985                 MP_WritePhyUshort(sc, 0x15, 0x00db);
16986                 MP_WritePhyUshort(sc, 0x19, 0x6f09);
16987                 MP_WritePhyUshort(sc, 0x15, 0x00dc);
16988                 MP_WritePhyUshort(sc, 0x19, 0xaefd);
16989                 MP_WritePhyUshort(sc, 0x15, 0x00dd);
16990                 MP_WritePhyUshort(sc, 0x19, 0x6f0b);
16991                 MP_WritePhyUshort(sc, 0x15, 0x00de);
16992                 MP_WritePhyUshort(sc, 0x19, 0xc60b);
16993                 MP_WritePhyUshort(sc, 0x15, 0x00df);
16994                 MP_WritePhyUshort(sc, 0x19, 0x00fa);
16995                 MP_WritePhyUshort(sc, 0x15, 0x00e0);
16996                 MP_WritePhyUshort(sc, 0x19, 0x30e1);
16997                 MP_WritePhyUshort(sc, 0x15, 0x020c);
16998                 MP_WritePhyUshort(sc, 0x19, 0x3224);
16999                 MP_WritePhyUshort(sc, 0x15, 0x020e);
17000                 MP_WritePhyUshort(sc, 0x19, 0x9813);
17001                 MP_WritePhyUshort(sc, 0x15, 0x020f);
17002                 MP_WritePhyUshort(sc, 0x19, 0x7801);
17003                 MP_WritePhyUshort(sc, 0x15, 0x0210);
17004                 MP_WritePhyUshort(sc, 0x19, 0x930f);
17005                 MP_WritePhyUshort(sc, 0x15, 0x0211);
17006                 MP_WritePhyUshort(sc, 0x19, 0x9206);
17007                 MP_WritePhyUshort(sc, 0x15, 0x0212);
17008                 MP_WritePhyUshort(sc, 0x19, 0x4002);
17009                 MP_WritePhyUshort(sc, 0x15, 0x0213);
17010                 MP_WritePhyUshort(sc, 0x19, 0x7800);
17011                 MP_WritePhyUshort(sc, 0x15, 0x0214);
17012                 MP_WritePhyUshort(sc, 0x19, 0x588f);
17013                 MP_WritePhyUshort(sc, 0x15, 0x0215);
17014                 MP_WritePhyUshort(sc, 0x19, 0x5520);
17015                 MP_WritePhyUshort(sc, 0x15, 0x0216);
17016                 MP_WritePhyUshort(sc, 0x19, 0x3224);
17017                 MP_WritePhyUshort(sc, 0x15, 0x0217);
17018                 MP_WritePhyUshort(sc, 0x19, 0x4002);
17019                 MP_WritePhyUshort(sc, 0x15, 0x0218);
17020                 MP_WritePhyUshort(sc, 0x19, 0x7800);
17021                 MP_WritePhyUshort(sc, 0x15, 0x0219);
17022                 MP_WritePhyUshort(sc, 0x19, 0x588d);
17023                 MP_WritePhyUshort(sc, 0x15, 0x021a);
17024                 MP_WritePhyUshort(sc, 0x19, 0x5540);
17025                 MP_WritePhyUshort(sc, 0x15, 0x021b);
17026                 MP_WritePhyUshort(sc, 0x19, 0x9e03);
17027                 MP_WritePhyUshort(sc, 0x15, 0x021c);
17028                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
17029                 MP_WritePhyUshort(sc, 0x15, 0x021d);
17030                 MP_WritePhyUshort(sc, 0x19, 0x6840);
17031                 MP_WritePhyUshort(sc, 0x15, 0x021e);
17032                 MP_WritePhyUshort(sc, 0x19, 0x3224);
17033                 MP_WritePhyUshort(sc, 0x15, 0x021f);
17034                 MP_WritePhyUshort(sc, 0x19, 0x4002);
17035                 MP_WritePhyUshort(sc, 0x15, 0x0220);
17036                 MP_WritePhyUshort(sc, 0x19, 0x3224);
17037                 MP_WritePhyUshort(sc, 0x15, 0x0221);
17038                 MP_WritePhyUshort(sc, 0x19, 0x9e03);
17039                 MP_WritePhyUshort(sc, 0x15, 0x0222);
17040                 MP_WritePhyUshort(sc, 0x19, 0x7c40);
17041                 MP_WritePhyUshort(sc, 0x15, 0x0223);
17042                 MP_WritePhyUshort(sc, 0x19, 0x6840);
17043                 MP_WritePhyUshort(sc, 0x15, 0x0224);
17044                 MP_WritePhyUshort(sc, 0x19, 0x7800);
17045                 MP_WritePhyUshort(sc, 0x15, 0x0225);
17046                 MP_WritePhyUshort(sc, 0x19, 0x3231);
17047                 MP_WritePhyUshort(sc, 0x15, 0x0000);
17048                 MP_WritePhyUshort(sc, 0x16, 0x0306);
17049                 MP_WritePhyUshort(sc, 0x16, 0x0300);
17050                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17051                 MP_WritePhyUshort(sc, 0x1f, 0x0005);
17052                 MP_WritePhyUshort(sc, 0x05, 0xfff6);
17053                 MP_WritePhyUshort(sc, 0x06, 0x0080);
17054                 MP_WritePhyUshort(sc, 0x05, 0x8000);
17055                 MP_WritePhyUshort(sc, 0x06, 0x0280);
17056                 MP_WritePhyUshort(sc, 0x06, 0x48f7);
17057                 MP_WritePhyUshort(sc, 0x06, 0x00e0);
17058                 MP_WritePhyUshort(sc, 0x06, 0xfff7);
17059                 MP_WritePhyUshort(sc, 0x06, 0xa080);
17060                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
17061                 MP_WritePhyUshort(sc, 0x06, 0xf602);
17062                 MP_WritePhyUshort(sc, 0x06, 0x011e);
17063                 MP_WritePhyUshort(sc, 0x06, 0x0201);
17064                 MP_WritePhyUshort(sc, 0x06, 0x2b02);
17065                 MP_WritePhyUshort(sc, 0x06, 0x8077);
17066                 MP_WritePhyUshort(sc, 0x06, 0x0201);
17067                 MP_WritePhyUshort(sc, 0x06, 0x4802);
17068                 MP_WritePhyUshort(sc, 0x06, 0x0162);
17069                 MP_WritePhyUshort(sc, 0x06, 0x0280);
17070                 MP_WritePhyUshort(sc, 0x06, 0x9402);
17071                 MP_WritePhyUshort(sc, 0x06, 0x810e);
17072                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
17073                 MP_WritePhyUshort(sc, 0x06, 0x88e1);
17074                 MP_WritePhyUshort(sc, 0x06, 0x8b89);
17075                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
17076                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
17077                 MP_WritePhyUshort(sc, 0x06, 0x8a1e);
17078                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
17079                 MP_WritePhyUshort(sc, 0x06, 0x8b8b);
17080                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
17081                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
17082                 MP_WritePhyUshort(sc, 0x06, 0x8c1e);
17083                 MP_WritePhyUshort(sc, 0x06, 0x01e1);
17084                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
17085                 MP_WritePhyUshort(sc, 0x06, 0x1e01);
17086                 MP_WritePhyUshort(sc, 0x06, 0xe18b);
17087                 MP_WritePhyUshort(sc, 0x06, 0x8e1e);
17088                 MP_WritePhyUshort(sc, 0x06, 0x01a0);
17089                 MP_WritePhyUshort(sc, 0x06, 0x00c7);
17090                 MP_WritePhyUshort(sc, 0x06, 0xaebb);
17091                 MP_WritePhyUshort(sc, 0x06, 0xd481);
17092                 MP_WritePhyUshort(sc, 0x06, 0xd4e4);
17093                 MP_WritePhyUshort(sc, 0x06, 0x8b92);
17094                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
17095                 MP_WritePhyUshort(sc, 0x06, 0x9302);
17096                 MP_WritePhyUshort(sc, 0x06, 0x2e5a);
17097                 MP_WritePhyUshort(sc, 0x06, 0xbf8b);
17098                 MP_WritePhyUshort(sc, 0x06, 0x88ec);
17099                 MP_WritePhyUshort(sc, 0x06, 0x0019);
17100                 MP_WritePhyUshort(sc, 0x06, 0xa98b);
17101                 MP_WritePhyUshort(sc, 0x06, 0x90f9);
17102                 MP_WritePhyUshort(sc, 0x06, 0xeeff);
17103                 MP_WritePhyUshort(sc, 0x06, 0xf600);
17104                 MP_WritePhyUshort(sc, 0x06, 0xeeff);
17105                 MP_WritePhyUshort(sc, 0x06, 0xf7fc);
17106                 MP_WritePhyUshort(sc, 0x06, 0xd100);
17107                 MP_WritePhyUshort(sc, 0x06, 0xbf83);
17108                 MP_WritePhyUshort(sc, 0x06, 0x3c02);
17109                 MP_WritePhyUshort(sc, 0x06, 0x3a21);
17110                 MP_WritePhyUshort(sc, 0x06, 0xd101);
17111                 MP_WritePhyUshort(sc, 0x06, 0xbf83);
17112                 MP_WritePhyUshort(sc, 0x06, 0x3f02);
17113                 MP_WritePhyUshort(sc, 0x06, 0x3a21);
17114                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
17115                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
17116                 MP_WritePhyUshort(sc, 0x06, 0x8aad);
17117                 MP_WritePhyUshort(sc, 0x06, 0x2014);
17118                 MP_WritePhyUshort(sc, 0x06, 0xee8b);
17119                 MP_WritePhyUshort(sc, 0x06, 0x8a00);
17120                 MP_WritePhyUshort(sc, 0x06, 0x0220);
17121                 MP_WritePhyUshort(sc, 0x06, 0x8be0);
17122                 MP_WritePhyUshort(sc, 0x06, 0xe426);
17123                 MP_WritePhyUshort(sc, 0x06, 0xe1e4);
17124                 MP_WritePhyUshort(sc, 0x06, 0x27ee);
17125                 MP_WritePhyUshort(sc, 0x06, 0xe426);
17126                 MP_WritePhyUshort(sc, 0x06, 0x23e5);
17127                 MP_WritePhyUshort(sc, 0x06, 0xe427);
17128                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
17129                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
17130                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
17131                 MP_WritePhyUshort(sc, 0x06, 0xad20);
17132                 MP_WritePhyUshort(sc, 0x06, 0x14ee);
17133                 MP_WritePhyUshort(sc, 0x06, 0x8b8d);
17134                 MP_WritePhyUshort(sc, 0x06, 0x00e0);
17135                 MP_WritePhyUshort(sc, 0x06, 0x8a5a);
17136                 MP_WritePhyUshort(sc, 0x06, 0x7803);
17137                 MP_WritePhyUshort(sc, 0x06, 0x9e09);
17138                 MP_WritePhyUshort(sc, 0x06, 0x0206);
17139                 MP_WritePhyUshort(sc, 0x06, 0x2802);
17140                 MP_WritePhyUshort(sc, 0x06, 0x80b1);
17141                 MP_WritePhyUshort(sc, 0x06, 0x0232);
17142                 MP_WritePhyUshort(sc, 0x06, 0xfdfc);
17143                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
17144                 MP_WritePhyUshort(sc, 0x06, 0xf9e0);
17145                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
17146                 MP_WritePhyUshort(sc, 0x06, 0xac26);
17147                 MP_WritePhyUshort(sc, 0x06, 0x1ae0);
17148                 MP_WritePhyUshort(sc, 0x06, 0x8b81);
17149                 MP_WritePhyUshort(sc, 0x06, 0xac21);
17150                 MP_WritePhyUshort(sc, 0x06, 0x14e0);
17151                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
17152                 MP_WritePhyUshort(sc, 0x06, 0xac20);
17153                 MP_WritePhyUshort(sc, 0x06, 0x0ee0);
17154                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
17155                 MP_WritePhyUshort(sc, 0x06, 0xac23);
17156                 MP_WritePhyUshort(sc, 0x06, 0x08e0);
17157                 MP_WritePhyUshort(sc, 0x06, 0x8b87);
17158                 MP_WritePhyUshort(sc, 0x06, 0xac24);
17159                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
17160                 MP_WritePhyUshort(sc, 0x06, 0x3802);
17161                 MP_WritePhyUshort(sc, 0x06, 0x1b02);
17162                 MP_WritePhyUshort(sc, 0x06, 0xeee4);
17163                 MP_WritePhyUshort(sc, 0x06, 0x1c04);
17164                 MP_WritePhyUshort(sc, 0x06, 0xeee4);
17165                 MP_WritePhyUshort(sc, 0x06, 0x1d04);
17166                 MP_WritePhyUshort(sc, 0x06, 0xe2e0);
17167                 MP_WritePhyUshort(sc, 0x06, 0x7ce3);
17168                 MP_WritePhyUshort(sc, 0x06, 0xe07d);
17169                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
17170                 MP_WritePhyUshort(sc, 0x06, 0x38e1);
17171                 MP_WritePhyUshort(sc, 0x06, 0xe039);
17172                 MP_WritePhyUshort(sc, 0x06, 0xad2e);
17173                 MP_WritePhyUshort(sc, 0x06, 0x1bad);
17174                 MP_WritePhyUshort(sc, 0x06, 0x390d);
17175                 MP_WritePhyUshort(sc, 0x06, 0xd101);
17176                 MP_WritePhyUshort(sc, 0x06, 0xbf22);
17177                 MP_WritePhyUshort(sc, 0x06, 0xe802);
17178                 MP_WritePhyUshort(sc, 0x06, 0x3a21);
17179                 MP_WritePhyUshort(sc, 0x06, 0x0222);
17180                 MP_WritePhyUshort(sc, 0x06, 0x10ae);
17181                 MP_WritePhyUshort(sc, 0x06, 0x0bac);
17182                 MP_WritePhyUshort(sc, 0x06, 0x3802);
17183                 MP_WritePhyUshort(sc, 0x06, 0xae06);
17184                 MP_WritePhyUshort(sc, 0x06, 0x0222);
17185                 MP_WritePhyUshort(sc, 0x06, 0x4d02);
17186                 MP_WritePhyUshort(sc, 0x06, 0x2292);
17187                 MP_WritePhyUshort(sc, 0x06, 0x021b);
17188                 MP_WritePhyUshort(sc, 0x06, 0x13fd);
17189                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
17190                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
17191                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17192                 MP_WritePhyUshort(sc, 0x06, 0xad20);
17193                 MP_WritePhyUshort(sc, 0x06, 0x1af6);
17194                 MP_WritePhyUshort(sc, 0x06, 0x20e4);
17195                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17196                 MP_WritePhyUshort(sc, 0x06, 0x022b);
17197                 MP_WritePhyUshort(sc, 0x06, 0x1e02);
17198                 MP_WritePhyUshort(sc, 0x06, 0x82ae);
17199                 MP_WritePhyUshort(sc, 0x06, 0x0203);
17200                 MP_WritePhyUshort(sc, 0x06, 0xc002);
17201                 MP_WritePhyUshort(sc, 0x06, 0x827d);
17202                 MP_WritePhyUshort(sc, 0x06, 0x022e);
17203                 MP_WritePhyUshort(sc, 0x06, 0x6f02);
17204                 MP_WritePhyUshort(sc, 0x06, 0x047b);
17205                 MP_WritePhyUshort(sc, 0x06, 0x022f);
17206                 MP_WritePhyUshort(sc, 0x06, 0x9ae0);
17207                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17208                 MP_WritePhyUshort(sc, 0x06, 0xad21);
17209                 MP_WritePhyUshort(sc, 0x06, 0x0bf6);
17210                 MP_WritePhyUshort(sc, 0x06, 0x21e4);
17211                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17212                 MP_WritePhyUshort(sc, 0x06, 0x0281);
17213                 MP_WritePhyUshort(sc, 0x06, 0x9002);
17214                 MP_WritePhyUshort(sc, 0x06, 0x1cd9);
17215                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
17216                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
17217                 MP_WritePhyUshort(sc, 0x06, 0x2208);
17218                 MP_WritePhyUshort(sc, 0x06, 0xf622);
17219                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
17220                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
17221                 MP_WritePhyUshort(sc, 0x06, 0x35f4);
17222                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
17223                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
17224                 MP_WritePhyUshort(sc, 0x06, 0x2308);
17225                 MP_WritePhyUshort(sc, 0x06, 0xf623);
17226                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
17227                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
17228                 MP_WritePhyUshort(sc, 0x06, 0x31e8);
17229                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
17230                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
17231                 MP_WritePhyUshort(sc, 0x06, 0x2405);
17232                 MP_WritePhyUshort(sc, 0x06, 0xf624);
17233                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
17234                 MP_WritePhyUshort(sc, 0x06, 0x8ee0);
17235                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17236                 MP_WritePhyUshort(sc, 0x06, 0xad25);
17237                 MP_WritePhyUshort(sc, 0x06, 0x05f6);
17238                 MP_WritePhyUshort(sc, 0x06, 0x25e4);
17239                 MP_WritePhyUshort(sc, 0x06, 0x8b8e);
17240                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
17241                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
17242                 MP_WritePhyUshort(sc, 0x06, 0x2608);
17243                 MP_WritePhyUshort(sc, 0x06, 0xf626);
17244                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
17245                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
17246                 MP_WritePhyUshort(sc, 0x06, 0x2d8a);
17247                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
17248                 MP_WritePhyUshort(sc, 0x06, 0x8ead);
17249                 MP_WritePhyUshort(sc, 0x06, 0x2705);
17250                 MP_WritePhyUshort(sc, 0x06, 0xf627);
17251                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
17252                 MP_WritePhyUshort(sc, 0x06, 0x8e02);
17253                 MP_WritePhyUshort(sc, 0x06, 0x0386);
17254                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
17255                 MP_WritePhyUshort(sc, 0x06, 0xf8fa);
17256                 MP_WritePhyUshort(sc, 0x06, 0xef69);
17257                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
17258                 MP_WritePhyUshort(sc, 0x06, 0x00e1);
17259                 MP_WritePhyUshort(sc, 0x06, 0xe001);
17260                 MP_WritePhyUshort(sc, 0x06, 0xad27);
17261                 MP_WritePhyUshort(sc, 0x06, 0x32e0);
17262                 MP_WritePhyUshort(sc, 0x06, 0x8b40);
17263                 MP_WritePhyUshort(sc, 0x06, 0xf720);
17264                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
17265                 MP_WritePhyUshort(sc, 0x06, 0x40bf);
17266                 MP_WritePhyUshort(sc, 0x06, 0x32c1);
17267                 MP_WritePhyUshort(sc, 0x06, 0x0239);
17268                 MP_WritePhyUshort(sc, 0x06, 0xf4ad);
17269                 MP_WritePhyUshort(sc, 0x06, 0x2821);
17270                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
17271                 MP_WritePhyUshort(sc, 0x06, 0x20e1);
17272                 MP_WritePhyUshort(sc, 0x06, 0xe021);
17273                 MP_WritePhyUshort(sc, 0x06, 0xad20);
17274                 MP_WritePhyUshort(sc, 0x06, 0x18e0);
17275                 MP_WritePhyUshort(sc, 0x06, 0x8b40);
17276                 MP_WritePhyUshort(sc, 0x06, 0xf620);
17277                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
17278                 MP_WritePhyUshort(sc, 0x06, 0x40ee);
17279                 MP_WritePhyUshort(sc, 0x06, 0x8b3b);
17280                 MP_WritePhyUshort(sc, 0x06, 0xffe0);
17281                 MP_WritePhyUshort(sc, 0x06, 0x8a8a);
17282                 MP_WritePhyUshort(sc, 0x06, 0xe18a);
17283                 MP_WritePhyUshort(sc, 0x06, 0x8be4);
17284                 MP_WritePhyUshort(sc, 0x06, 0xe000);
17285                 MP_WritePhyUshort(sc, 0x06, 0xe5e0);
17286                 MP_WritePhyUshort(sc, 0x06, 0x01ef);
17287                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
17288                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
17289                 MP_WritePhyUshort(sc, 0x06, 0xf8f9);
17290                 MP_WritePhyUshort(sc, 0x06, 0xface);
17291                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
17292                 MP_WritePhyUshort(sc, 0x06, 0x69fa);
17293                 MP_WritePhyUshort(sc, 0x06, 0xd401);
17294                 MP_WritePhyUshort(sc, 0x06, 0x55b4);
17295                 MP_WritePhyUshort(sc, 0x06, 0xfebf);
17296                 MP_WritePhyUshort(sc, 0x06, 0x1c5e);
17297                 MP_WritePhyUshort(sc, 0x06, 0x0239);
17298                 MP_WritePhyUshort(sc, 0x06, 0xf4ac);
17299                 MP_WritePhyUshort(sc, 0x06, 0x280b);
17300                 MP_WritePhyUshort(sc, 0x06, 0xbf1c);
17301                 MP_WritePhyUshort(sc, 0x06, 0x5b02);
17302                 MP_WritePhyUshort(sc, 0x06, 0x39f4);
17303                 MP_WritePhyUshort(sc, 0x06, 0xac28);
17304                 MP_WritePhyUshort(sc, 0x06, 0x49ae);
17305                 MP_WritePhyUshort(sc, 0x06, 0x64bf);
17306                 MP_WritePhyUshort(sc, 0x06, 0x1c5b);
17307                 MP_WritePhyUshort(sc, 0x06, 0x0239);
17308                 MP_WritePhyUshort(sc, 0x06, 0xf4ac);
17309                 MP_WritePhyUshort(sc, 0x06, 0x285b);
17310                 MP_WritePhyUshort(sc, 0x06, 0xd000);
17311                 MP_WritePhyUshort(sc, 0x06, 0x0282);
17312                 MP_WritePhyUshort(sc, 0x06, 0x62ac);
17313                 MP_WritePhyUshort(sc, 0x06, 0x2105);
17314                 MP_WritePhyUshort(sc, 0x06, 0xac22);
17315                 MP_WritePhyUshort(sc, 0x06, 0x02ae);
17316                 MP_WritePhyUshort(sc, 0x06, 0x4ebf);
17317                 MP_WritePhyUshort(sc, 0x06, 0xe0c4);
17318                 MP_WritePhyUshort(sc, 0x06, 0xbe85);
17319                 MP_WritePhyUshort(sc, 0x06, 0xecd2);
17320                 MP_WritePhyUshort(sc, 0x06, 0x04d8);
17321                 MP_WritePhyUshort(sc, 0x06, 0x19d9);
17322                 MP_WritePhyUshort(sc, 0x06, 0x1907);
17323                 MP_WritePhyUshort(sc, 0x06, 0xdc19);
17324                 MP_WritePhyUshort(sc, 0x06, 0xdd19);
17325                 MP_WritePhyUshort(sc, 0x06, 0x0789);
17326                 MP_WritePhyUshort(sc, 0x06, 0x89ef);
17327                 MP_WritePhyUshort(sc, 0x06, 0x645e);
17328                 MP_WritePhyUshort(sc, 0x06, 0x07ff);
17329                 MP_WritePhyUshort(sc, 0x06, 0x0d65);
17330                 MP_WritePhyUshort(sc, 0x06, 0x5cf8);
17331                 MP_WritePhyUshort(sc, 0x06, 0x001e);
17332                 MP_WritePhyUshort(sc, 0x06, 0x46dc);
17333                 MP_WritePhyUshort(sc, 0x06, 0x19dd);
17334                 MP_WritePhyUshort(sc, 0x06, 0x19b2);
17335                 MP_WritePhyUshort(sc, 0x06, 0xe2d4);
17336                 MP_WritePhyUshort(sc, 0x06, 0x0001);
17337                 MP_WritePhyUshort(sc, 0x06, 0xbf1c);
17338                 MP_WritePhyUshort(sc, 0x06, 0x5b02);
17339                 MP_WritePhyUshort(sc, 0x06, 0x3a21);
17340                 MP_WritePhyUshort(sc, 0x06, 0xae1d);
17341                 MP_WritePhyUshort(sc, 0x06, 0xbee0);
17342                 MP_WritePhyUshort(sc, 0x06, 0xc4bf);
17343                 MP_WritePhyUshort(sc, 0x06, 0x85ec);
17344                 MP_WritePhyUshort(sc, 0x06, 0xd204);
17345                 MP_WritePhyUshort(sc, 0x06, 0xd819);
17346                 MP_WritePhyUshort(sc, 0x06, 0xd919);
17347                 MP_WritePhyUshort(sc, 0x06, 0x07dc);
17348                 MP_WritePhyUshort(sc, 0x06, 0x19dd);
17349                 MP_WritePhyUshort(sc, 0x06, 0x1907);
17350                 MP_WritePhyUshort(sc, 0x06, 0xb2f4);
17351                 MP_WritePhyUshort(sc, 0x06, 0xd400);
17352                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
17353                 MP_WritePhyUshort(sc, 0x06, 0x1c5b);
17354                 MP_WritePhyUshort(sc, 0x06, 0x023a);
17355                 MP_WritePhyUshort(sc, 0x06, 0x21fe);
17356                 MP_WritePhyUshort(sc, 0x06, 0xef96);
17357                 MP_WritePhyUshort(sc, 0x06, 0xfec6);
17358                 MP_WritePhyUshort(sc, 0x06, 0xfefd);
17359                 MP_WritePhyUshort(sc, 0x06, 0xfc05);
17360                 MP_WritePhyUshort(sc, 0x06, 0xf9e2);
17361                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
17362                 MP_WritePhyUshort(sc, 0x06, 0xe3e0);
17363                 MP_WritePhyUshort(sc, 0x06, 0xeb5a);
17364                 MP_WritePhyUshort(sc, 0x06, 0x070c);
17365                 MP_WritePhyUshort(sc, 0x06, 0x031e);
17366                 MP_WritePhyUshort(sc, 0x06, 0x20e6);
17367                 MP_WritePhyUshort(sc, 0x06, 0xe0ea);
17368                 MP_WritePhyUshort(sc, 0x06, 0xe7e0);
17369                 MP_WritePhyUshort(sc, 0x06, 0xebe0);
17370                 MP_WritePhyUshort(sc, 0x06, 0xe0fc);
17371                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
17372                 MP_WritePhyUshort(sc, 0x06, 0xfdfd);
17373                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
17374                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
17375                 MP_WritePhyUshort(sc, 0x06, 0x69e0);
17376                 MP_WritePhyUshort(sc, 0x06, 0x8b80);
17377                 MP_WritePhyUshort(sc, 0x06, 0xad27);
17378                 MP_WritePhyUshort(sc, 0x06, 0x22bf);
17379                 MP_WritePhyUshort(sc, 0x06, 0x47ba);
17380                 MP_WritePhyUshort(sc, 0x06, 0x0239);
17381                 MP_WritePhyUshort(sc, 0x06, 0xf4e0);
17382                 MP_WritePhyUshort(sc, 0x06, 0x8b44);
17383                 MP_WritePhyUshort(sc, 0x06, 0x1f01);
17384                 MP_WritePhyUshort(sc, 0x06, 0x9e15);
17385                 MP_WritePhyUshort(sc, 0x06, 0xe58b);
17386                 MP_WritePhyUshort(sc, 0x06, 0x44ad);
17387                 MP_WritePhyUshort(sc, 0x06, 0x2907);
17388                 MP_WritePhyUshort(sc, 0x06, 0xac28);
17389                 MP_WritePhyUshort(sc, 0x06, 0x04d1);
17390                 MP_WritePhyUshort(sc, 0x06, 0x01ae);
17391                 MP_WritePhyUshort(sc, 0x06, 0x02d1);
17392                 MP_WritePhyUshort(sc, 0x06, 0x00bf);
17393                 MP_WritePhyUshort(sc, 0x06, 0x8342);
17394                 MP_WritePhyUshort(sc, 0x06, 0x023a);
17395                 MP_WritePhyUshort(sc, 0x06, 0x21ef);
17396                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
17397                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
17398                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
17399                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
17400                 MP_WritePhyUshort(sc, 0x06, 0xad26);
17401                 MP_WritePhyUshort(sc, 0x06, 0x30e0);
17402                 MP_WritePhyUshort(sc, 0x06, 0xe036);
17403                 MP_WritePhyUshort(sc, 0x06, 0xe1e0);
17404                 MP_WritePhyUshort(sc, 0x06, 0x37e1);
17405                 MP_WritePhyUshort(sc, 0x06, 0x8b3f);
17406                 MP_WritePhyUshort(sc, 0x06, 0x1f10);
17407                 MP_WritePhyUshort(sc, 0x06, 0x9e23);
17408                 MP_WritePhyUshort(sc, 0x06, 0xe48b);
17409                 MP_WritePhyUshort(sc, 0x06, 0x3fac);
17410                 MP_WritePhyUshort(sc, 0x06, 0x200b);
17411                 MP_WritePhyUshort(sc, 0x06, 0xac21);
17412                 MP_WritePhyUshort(sc, 0x06, 0x0dac);
17413                 MP_WritePhyUshort(sc, 0x06, 0x250f);
17414                 MP_WritePhyUshort(sc, 0x06, 0xac27);
17415                 MP_WritePhyUshort(sc, 0x06, 0x11ae);
17416                 MP_WritePhyUshort(sc, 0x06, 0x1202);
17417                 MP_WritePhyUshort(sc, 0x06, 0x2cb5);
17418                 MP_WritePhyUshort(sc, 0x06, 0xae0d);
17419                 MP_WritePhyUshort(sc, 0x06, 0x0282);
17420                 MP_WritePhyUshort(sc, 0x06, 0xe7ae);
17421                 MP_WritePhyUshort(sc, 0x06, 0x0802);
17422                 MP_WritePhyUshort(sc, 0x06, 0x2cd7);
17423                 MP_WritePhyUshort(sc, 0x06, 0xae03);
17424                 MP_WritePhyUshort(sc, 0x06, 0x022c);
17425                 MP_WritePhyUshort(sc, 0x06, 0xeafc);
17426                 MP_WritePhyUshort(sc, 0x06, 0x04f8);
17427                 MP_WritePhyUshort(sc, 0x06, 0xfaef);
17428                 MP_WritePhyUshort(sc, 0x06, 0x6902);
17429                 MP_WritePhyUshort(sc, 0x06, 0x8304);
17430                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
17431                 MP_WritePhyUshort(sc, 0x06, 0x14e1);
17432                 MP_WritePhyUshort(sc, 0x06, 0xe015);
17433                 MP_WritePhyUshort(sc, 0x06, 0xad26);
17434                 MP_WritePhyUshort(sc, 0x06, 0x08d1);
17435                 MP_WritePhyUshort(sc, 0x06, 0x1ebf);
17436                 MP_WritePhyUshort(sc, 0x06, 0x2d47);
17437                 MP_WritePhyUshort(sc, 0x06, 0x023a);
17438                 MP_WritePhyUshort(sc, 0x06, 0x21ef);
17439                 MP_WritePhyUshort(sc, 0x06, 0x96fe);
17440                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
17441                 MP_WritePhyUshort(sc, 0x06, 0xf8e0);
17442                 MP_WritePhyUshort(sc, 0x06, 0x8b85);
17443                 MP_WritePhyUshort(sc, 0x06, 0xad27);
17444                 MP_WritePhyUshort(sc, 0x06, 0x2fd0);
17445                 MP_WritePhyUshort(sc, 0x06, 0x0b02);
17446                 MP_WritePhyUshort(sc, 0x06, 0x3826);
17447                 MP_WritePhyUshort(sc, 0x06, 0x5882);
17448                 MP_WritePhyUshort(sc, 0x06, 0x7882);
17449                 MP_WritePhyUshort(sc, 0x06, 0x9f24);
17450                 MP_WritePhyUshort(sc, 0x06, 0xe08b);
17451                 MP_WritePhyUshort(sc, 0x06, 0x32e1);
17452                 MP_WritePhyUshort(sc, 0x06, 0x8b33);
17453                 MP_WritePhyUshort(sc, 0x06, 0x1f10);
17454                 MP_WritePhyUshort(sc, 0x06, 0x9e1a);
17455                 MP_WritePhyUshort(sc, 0x06, 0x10e4);
17456                 MP_WritePhyUshort(sc, 0x06, 0x8b32);
17457                 MP_WritePhyUshort(sc, 0x06, 0xe0e0);
17458                 MP_WritePhyUshort(sc, 0x06, 0x28e1);
17459                 MP_WritePhyUshort(sc, 0x06, 0xe029);
17460                 MP_WritePhyUshort(sc, 0x06, 0xf72c);
17461                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
17462                 MP_WritePhyUshort(sc, 0x06, 0x28e5);
17463                 MP_WritePhyUshort(sc, 0x06, 0xe029);
17464                 MP_WritePhyUshort(sc, 0x06, 0xf62c);
17465                 MP_WritePhyUshort(sc, 0x06, 0xe4e0);
17466                 MP_WritePhyUshort(sc, 0x06, 0x28e5);
17467                 MP_WritePhyUshort(sc, 0x06, 0xe029);
17468                 MP_WritePhyUshort(sc, 0x06, 0xfc04);
17469                 MP_WritePhyUshort(sc, 0x06, 0x00e1);
17470                 MP_WritePhyUshort(sc, 0x06, 0x4077);
17471                 MP_WritePhyUshort(sc, 0x06, 0xe140);
17472                 MP_WritePhyUshort(sc, 0x06, 0xbbe0);
17473                 MP_WritePhyUshort(sc, 0x06, 0x2a00);
17474                 MP_WritePhyUshort(sc, 0x05, 0xe142);
17475                 Data = MP_ReadPhyUshort(sc, 0x06);
17476                 Data |= BIT_0;
17477                 MP_WritePhyUshort(sc,0x06, Data);
17478                 MP_WritePhyUshort(sc, 0x05, 0xe140);
17479                 Data = MP_ReadPhyUshort(sc, 0x06);
17480                 Data |= BIT_0;
17481                 MP_WritePhyUshort(sc,0x06, Data);
17482                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17483                 MP_WritePhyUshort(sc,0x1f, 0x0005);
17484                 WaitCnt = 0;
17485                 for (i = 0; i < 200; i++) {
17486                         DELAY(100);
17487                         Data = MP_ReadPhyUshort(sc, 0x00);
17488                         if (Data & BIT_7)
17489                                 break;
17490                 }
17491                 MP_WritePhyUshort(sc,0x1f, 0x0007);
17492                 MP_WritePhyUshort(sc,0x1e, 0x0023);
17493                 Data = MP_ReadPhyUshort(sc, 0x17);
17494                 Data |= BIT_1;
17495                 MP_WritePhyUshort(sc, 0x17, Data);
17496                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17497                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
17498                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
17499                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17500                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
17501                 MP_WritePhyUshort(sc, 0x01, 0x328A);
17502                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17503                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
17504                 Data = MP_ReadPhyUshort(sc, 0x19);
17505                 Data &= ~BIT_0;
17506                 MP_WritePhyUshort(sc, 0x19, Data);
17507                 Data = MP_ReadPhyUshort(sc, 0x10);
17508                 Data &= ~BIT_10;
17509                 MP_WritePhyUshort(sc, 0x10, Data);
17510                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17511                 MP_WritePhyUshort(sc, 0x00, 0x9200);
17512
17513                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
17514                 MP_WritePhyUshort(sc, 0x05, 0x8B80);
17515                 Data = MP_ReadPhyUshort(sc, 0x06);
17516                 Data |= BIT_2 | BIT_1;
17517                 MP_WritePhyUshort(sc, 0x06, Data);
17518                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17519
17520                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
17521                 MP_WritePhyUshort(sc, 0x1E, 0x002D);
17522                 Data = MP_ReadPhyUshort(sc, 0x18);
17523                 Data |= BIT_4;
17524                 MP_WritePhyUshort(sc, 0x18, Data);
17525                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
17526                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17527                 Data = MP_ReadPhyUshort(sc, 0x14);
17528                 Data |= BIT_15;
17529                 MP_WritePhyUshort(sc, 0x14, Data);
17530
17531                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
17532                 MP_WritePhyUshort(sc, 0x05, 0x8B86);
17533                 Data = MP_ReadPhyUshort(sc, 0x06);
17534                 Data |= BIT_0;
17535                 MP_WritePhyUshort(sc, 0x06, Data);
17536                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17537
17538                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
17539                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
17540                 Data = MP_ReadPhyUshort(sc, 0x06);
17541                 Data |= BIT_14;
17542                 MP_WritePhyUshort(sc, 0x06, Data);
17543                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17544
17545                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
17546                 MP_WritePhyUshort(sc, 0x09, 0xA20F);
17547                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
17548
17549                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
17550                 MP_WritePhyUshort(sc, 0x05, 0x8B55);
17551                 MP_WritePhyUshort(sc, 0x06, 0x0000);
17552                 MP_WritePhyUshort(sc, 0x05, 0x8B5E);
17553                 MP_WritePhyUshort(sc, 0x06, 0x0000);
17554                 MP_WritePhyUshort(sc, 0x05, 0x8B67);
17555                 MP_WritePhyUshort(sc, 0x06, 0x0000);
17556                 MP_WritePhyUshort(sc, 0x05, 0x8B70);
17557                 MP_WritePhyUshort(sc, 0x06, 0x0000);
17558                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17559                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
17560                 MP_WritePhyUshort(sc, 0x1E, 0x0078);
17561                 MP_WritePhyUshort(sc, 0x17, 0x0000);
17562                 MP_WritePhyUshort(sc, 0x19, 0x00FB);
17563                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17564
17565                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
17566                 MP_WritePhyUshort(sc, 0x05, 0x8B79);
17567                 MP_WritePhyUshort(sc, 0x06, 0xAA00);
17568                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17569
17570                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
17571                 MP_WritePhyUshort(sc, 0x01, 0x328A);
17572                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
17573
17574                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
17575                 MP_WritePhyUshort(sc, 0x05, 0x8B54);
17576                 Data = MP_ReadPhyUshort(sc, 0x06);
17577                 Data &= ~BIT_11;
17578                 MP_WritePhyUshort(sc, 0x06, Data);
17579                 MP_WritePhyUshort(sc, 0x05, 0x8B5D);
17580                 Data = MP_ReadPhyUshort(sc, 0x06);
17581                 Data &= ~BIT_11;
17582                 MP_WritePhyUshort(sc, 0x06, Data);
17583                 MP_WritePhyUshort(sc, 0x05, 0x8A7C);
17584                 Data = MP_ReadPhyUshort(sc, 0x06);
17585                 Data &= ~BIT_8;
17586                 MP_WritePhyUshort(sc, 0x06, Data);
17587                 MP_WritePhyUshort(sc, 0x05, 0x8A7F);
17588                 Data = MP_ReadPhyUshort(sc, 0x06);
17589                 Data |= BIT_8;
17590                 MP_WritePhyUshort(sc, 0x06, Data);
17591                 MP_WritePhyUshort(sc, 0x05, 0x8A82);
17592                 Data = MP_ReadPhyUshort(sc, 0x06);
17593                 Data &= ~BIT_8;
17594                 MP_WritePhyUshort(sc, 0x06, Data);
17595                 MP_WritePhyUshort(sc, 0x05, 0x8A85);
17596                 Data = MP_ReadPhyUshort(sc, 0x06);
17597                 Data &= ~BIT_8;
17598                 MP_WritePhyUshort(sc, 0x06, Data);
17599                 MP_WritePhyUshort(sc, 0x05, 0x8A88);
17600                 Data = MP_ReadPhyUshort(sc, 0x06);
17601                 Data &= ~BIT_8;
17602                 MP_WritePhyUshort(sc, 0x06, Data);
17603                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
17604
17605                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
17606                 MP_WritePhyUshort(sc, 0x05, 0x8B85);
17607                 Data = MP_ReadPhyUshort(sc, 0x06);
17608                 Data |= BIT_15;
17609                 MP_WritePhyUshort(sc, 0x06, Data);
17610                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17611
17612                 MP_WritePhyUshort(sc, 0x1f, 0x0003);
17613                 Data = MP_ReadPhyUshort(sc, 0x19);
17614                 Data &= ~BIT_0;
17615                 MP_WritePhyUshort(sc, 0x19, Data);
17616                 Data = MP_ReadPhyUshort(sc, 0x10);
17617                 Data &= ~BIT_10;
17618                 MP_WritePhyUshort(sc, 0x10, Data);
17619                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
17620         } else if (sc->re_type == MACFG_53) {
17621                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
17622                 Data_u32 &= 0xFFFF0000;
17623                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
17624
17625                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
17626                 MP_WritePhyUshort(sc, 0x18, 0x0310);
17627                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
17628
17629                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
17630                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
17631                 MP_WritePhyUshort(sc, 0x19, 0x7070);
17632                 MP_WritePhyUshort(sc, 0x1c, 0x0600);
17633                 MP_WritePhyUshort(sc, 0x1d, 0x9700);
17634                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
17635                 MP_WritePhyUshort(sc, 0x1d, 0x6900);
17636                 MP_WritePhyUshort(sc, 0x1d, 0x7d00);
17637                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
17638                 MP_WritePhyUshort(sc, 0x1d, 0x4899);
17639                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17640                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
17641                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17642                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
17643                 MP_WritePhyUshort(sc, 0x1d, 0x8000);
17644                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17645                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
17646                 MP_WritePhyUshort(sc, 0x1d, 0x4007);
17647                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
17648                 MP_WritePhyUshort(sc, 0x1d, 0x4800);
17649                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17650                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
17651                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
17652                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
17653                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
17654                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
17655                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17656                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17657                 MP_WritePhyUshort(sc, 0x1d, 0x571f);
17658                 MP_WritePhyUshort(sc, 0x1d, 0x5ffb);
17659                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
17660                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
17661                 MP_WritePhyUshort(sc, 0x1d, 0x301e);
17662                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
17663                 MP_WritePhyUshort(sc, 0x1d, 0xa6fc);
17664                 MP_WritePhyUshort(sc, 0x1d, 0xdcdb);
17665                 MP_WritePhyUshort(sc, 0x1d, 0x0015);
17666                 MP_WritePhyUshort(sc, 0x1d, 0xb915);
17667                 MP_WritePhyUshort(sc, 0x1d, 0xb511);
17668                 MP_WritePhyUshort(sc, 0x1d, 0xd16b);
17669                 MP_WritePhyUshort(sc, 0x1d, 0x000f);
17670                 MP_WritePhyUshort(sc, 0x1d, 0xb40f);
17671                 MP_WritePhyUshort(sc, 0x1d, 0xd06b);
17672                 MP_WritePhyUshort(sc, 0x1d, 0x000d);
17673                 MP_WritePhyUshort(sc, 0x1d, 0xb206);
17674                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
17675                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
17676                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
17677                 MP_WritePhyUshort(sc, 0x1d, 0x5c00);
17678                 MP_WritePhyUshort(sc, 0x1d, 0x301a);
17679                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
17680                 MP_WritePhyUshort(sc, 0x1d, 0x5801);
17681                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
17682                 MP_WritePhyUshort(sc, 0x1d, 0x5c04);
17683                 MP_WritePhyUshort(sc, 0x1d, 0x301e);
17684                 MP_WritePhyUshort(sc, 0x1d, 0x3079);
17685                 MP_WritePhyUshort(sc, 0x1d, 0x30f1);
17686                 MP_WritePhyUshort(sc, 0x1d, 0x3199);
17687                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17688                 MP_WritePhyUshort(sc, 0x1d, 0x4c60);
17689                 MP_WritePhyUshort(sc, 0x1d, 0x6803);
17690                 MP_WritePhyUshort(sc, 0x1d, 0x6420);
17691                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17692                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17693                 MP_WritePhyUshort(sc, 0x1d, 0xaf03);
17694                 MP_WritePhyUshort(sc, 0x1d, 0x6015);
17695                 MP_WritePhyUshort(sc, 0x1d, 0x3040);
17696                 MP_WritePhyUshort(sc, 0x1d, 0x6017);
17697                 MP_WritePhyUshort(sc, 0x1d, 0x57e0);
17698                 MP_WritePhyUshort(sc, 0x1d, 0x580c);
17699                 MP_WritePhyUshort(sc, 0x1d, 0x588c);
17700                 MP_WritePhyUshort(sc, 0x1d, 0x5fa3);
17701                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17702                 MP_WritePhyUshort(sc, 0x1d, 0x4827);
17703                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17704                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
17705                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17706                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
17707                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
17708                 MP_WritePhyUshort(sc, 0x1d, 0x7c30);
17709                 MP_WritePhyUshort(sc, 0x1d, 0x6020);
17710                 MP_WritePhyUshort(sc, 0x1d, 0x48bf);
17711                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17712                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
17713                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17714                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
17715                 MP_WritePhyUshort(sc, 0x1d, 0xd6cf);
17716                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
17717                 MP_WritePhyUshort(sc, 0x1d, 0x80fe);
17718                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17719                 MP_WritePhyUshort(sc, 0x1d, 0x4c80);
17720                 MP_WritePhyUshort(sc, 0x1d, 0x7c20);
17721                 MP_WritePhyUshort(sc, 0x1d, 0x5c20);
17722                 MP_WritePhyUshort(sc, 0x1d, 0x481e);
17723                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17724                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
17725                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17726                 MP_WritePhyUshort(sc, 0x1d, 0x4c02);
17727                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
17728                 MP_WritePhyUshort(sc, 0x1d, 0x81ff);
17729                 MP_WritePhyUshort(sc, 0x1d, 0x30ba);
17730                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17731                 MP_WritePhyUshort(sc, 0x1d, 0x4d00);
17732                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
17733                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17734                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
17735                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17736                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
17737                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
17738                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
17739                 MP_WritePhyUshort(sc, 0x1d, 0xa4cc);
17740                 MP_WritePhyUshort(sc, 0x1d, 0xd9b3);
17741                 MP_WritePhyUshort(sc, 0x1d, 0xfffe);
17742                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17743                 MP_WritePhyUshort(sc, 0x1d, 0x4d20);
17744                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
17745                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
17746                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
17747                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17748                 MP_WritePhyUshort(sc, 0x1d, 0x4dc0);
17749                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17750                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17751                 MP_WritePhyUshort(sc, 0x1d, 0xd09d);
17752                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
17753                 MP_WritePhyUshort(sc, 0x1d, 0xb4fe);
17754                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17755                 MP_WritePhyUshort(sc, 0x1d, 0x4d80);
17756                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
17757                 MP_WritePhyUshort(sc, 0x1d, 0x6004);
17758                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
17759                 MP_WritePhyUshort(sc, 0x1d, 0x6802);
17760                 MP_WritePhyUshort(sc, 0x1d, 0x6720);
17761                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17762                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17763                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
17764                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
17765                 MP_WritePhyUshort(sc, 0x1d, 0x486c);
17766                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17767                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
17768                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17769                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
17770                 MP_WritePhyUshort(sc, 0x1d, 0x9503);
17771                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
17772                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
17773                 MP_WritePhyUshort(sc, 0x1d, 0x571f);
17774                 MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
17775                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
17776                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
17777                 MP_WritePhyUshort(sc, 0x1d, 0x3092);
17778                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
17779                 MP_WritePhyUshort(sc, 0x1d, 0xcdab);
17780                 MP_WritePhyUshort(sc, 0x1d, 0xff78);
17781                 MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
17782                 MP_WritePhyUshort(sc, 0x1d, 0xff76);
17783                 MP_WritePhyUshort(sc, 0x1d, 0xd96b);
17784                 MP_WritePhyUshort(sc, 0x1d, 0xff74);
17785                 MP_WritePhyUshort(sc, 0x1d, 0xd0a0);
17786                 MP_WritePhyUshort(sc, 0x1d, 0xffd9);
17787                 MP_WritePhyUshort(sc, 0x1d, 0xcba0);
17788                 MP_WritePhyUshort(sc, 0x1d, 0x0003);
17789                 MP_WritePhyUshort(sc, 0x1d, 0x80f0);
17790                 MP_WritePhyUshort(sc, 0x1d, 0x309f);
17791                 MP_WritePhyUshort(sc, 0x1d, 0x30ac);
17792                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17793                 MP_WritePhyUshort(sc, 0x1d, 0x4ce0);
17794                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
17795                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17796                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
17797                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17798                 MP_WritePhyUshort(sc, 0x1d, 0x4c08);
17799                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
17800                 MP_WritePhyUshort(sc, 0x1d, 0x6008);
17801                 MP_WritePhyUshort(sc, 0x1d, 0x8300);
17802                 MP_WritePhyUshort(sc, 0x1d, 0xb902);
17803                 MP_WritePhyUshort(sc, 0x1d, 0x3079);
17804                 MP_WritePhyUshort(sc, 0x1d, 0x3061);
17805                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17806                 MP_WritePhyUshort(sc, 0x1d, 0x4da0);
17807                 MP_WritePhyUshort(sc, 0x1d, 0x6400);
17808                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17809                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17810                 MP_WritePhyUshort(sc, 0x1d, 0x57a0);
17811                 MP_WritePhyUshort(sc, 0x1d, 0x590c);
17812                 MP_WritePhyUshort(sc, 0x1d, 0x5fa3);
17813                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17814                 MP_WritePhyUshort(sc, 0x1d, 0xcba4);
17815                 MP_WritePhyUshort(sc, 0x1d, 0x0004);
17816                 MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
17817                 MP_WritePhyUshort(sc, 0x1d, 0x0002);
17818                 MP_WritePhyUshort(sc, 0x1d, 0x80fc);
17819                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17820                 MP_WritePhyUshort(sc, 0x1d, 0x4ca0);
17821                 MP_WritePhyUshort(sc, 0x1d, 0xb603);
17822                 MP_WritePhyUshort(sc, 0x1d, 0x7c10);
17823                 MP_WritePhyUshort(sc, 0x1d, 0x6010);
17824                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17825                 MP_WritePhyUshort(sc, 0x1d, 0x541f);
17826                 MP_WritePhyUshort(sc, 0x1d, 0x5fb3);
17827                 MP_WritePhyUshort(sc, 0x1d, 0xaa05);
17828                 MP_WritePhyUshort(sc, 0x1d, 0x7c80);
17829                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
17830                 MP_WritePhyUshort(sc, 0x1d, 0x5b58);
17831                 MP_WritePhyUshort(sc, 0x1d, 0x30ca);
17832                 MP_WritePhyUshort(sc, 0x1d, 0x7c80);
17833                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
17834                 MP_WritePhyUshort(sc, 0x1d, 0x5b64);
17835                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
17836                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17837                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
17838                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17839                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
17840                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
17841                 MP_WritePhyUshort(sc, 0x1d, 0x4827);
17842                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17843                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
17844                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17845                 MP_WritePhyUshort(sc, 0x1d, 0x4c10);
17846                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
17847                 MP_WritePhyUshort(sc, 0x1d, 0x7c10);
17848                 MP_WritePhyUshort(sc, 0x1d, 0x6000);
17849                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17850                 MP_WritePhyUshort(sc, 0x1d, 0x4cc0);
17851                 MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
17852                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
17853                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17854                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
17855                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17856                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
17857                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
17858                 MP_WritePhyUshort(sc, 0x1d, 0x7ce0);
17859                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
17860                 MP_WritePhyUshort(sc, 0x1d, 0x6720);
17861                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17862                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17863                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
17864                 MP_WritePhyUshort(sc, 0x1d, 0x6a00);
17865                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
17866                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17867                 MP_WritePhyUshort(sc, 0x1d, 0x4c00);
17868                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17869                 MP_WritePhyUshort(sc, 0x1d, 0x4c04);
17870                 MP_WritePhyUshort(sc, 0x1d, 0x8200);
17871                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
17872                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
17873                 MP_WritePhyUshort(sc, 0x1d, 0x309f);
17874                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17875                 MP_WritePhyUshort(sc, 0x1d, 0x4e00);
17876                 MP_WritePhyUshort(sc, 0x1d, 0x4007);
17877                 MP_WritePhyUshort(sc, 0x1d, 0x4400);
17878                 MP_WritePhyUshort(sc, 0x1d, 0x5310);
17879                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
17880                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
17881                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17882                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17883                 MP_WritePhyUshort(sc, 0x1d, 0x570f);
17884                 MP_WritePhyUshort(sc, 0x1d, 0x5fff);
17885                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
17886                 MP_WritePhyUshort(sc, 0x1d, 0x585b);
17887                 MP_WritePhyUshort(sc, 0x1d, 0x3100);
17888                 MP_WritePhyUshort(sc, 0x1d, 0x5867);
17889                 MP_WritePhyUshort(sc, 0x1d, 0x9403);
17890                 MP_WritePhyUshort(sc, 0x1d, 0x7e00);
17891                 MP_WritePhyUshort(sc, 0x1d, 0x6200);
17892                 MP_WritePhyUshort(sc, 0x1d, 0xcda3);
17893                 MP_WritePhyUshort(sc, 0x1d, 0x002d);
17894                 MP_WritePhyUshort(sc, 0x1d, 0xcd85);
17895                 MP_WritePhyUshort(sc, 0x1d, 0x002b);
17896                 MP_WritePhyUshort(sc, 0x1d, 0xd96b);
17897                 MP_WritePhyUshort(sc, 0x1d, 0x0029);
17898                 MP_WritePhyUshort(sc, 0x1d, 0x9629);
17899                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
17900                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
17901                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17902                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17903                 MP_WritePhyUshort(sc, 0x1d, 0x9624);
17904                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17905                 MP_WritePhyUshort(sc, 0x1d, 0x4e20);
17906                 MP_WritePhyUshort(sc, 0x1d, 0x8b04);
17907                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
17908                 MP_WritePhyUshort(sc, 0x1d, 0x5008);
17909                 MP_WritePhyUshort(sc, 0x1d, 0xab03);
17910                 MP_WritePhyUshort(sc, 0x1d, 0x7c08);
17911                 MP_WritePhyUshort(sc, 0x1d, 0x5000);
17912                 MP_WritePhyUshort(sc, 0x1d, 0x6801);
17913                 MP_WritePhyUshort(sc, 0x1d, 0x6776);
17914                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17915                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17916                 MP_WritePhyUshort(sc, 0x1d, 0xdb7c);
17917                 MP_WritePhyUshort(sc, 0x1d, 0xffee);
17918                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
17919                 MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
17920                 MP_WritePhyUshort(sc, 0x1d, 0x4e40);
17921                 MP_WritePhyUshort(sc, 0x1d, 0x4837);
17922                 MP_WritePhyUshort(sc, 0x1d, 0x4418);
17923                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
17924                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17925                 MP_WritePhyUshort(sc, 0x1d, 0x4e40);
17926                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
17927                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
17928                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17929                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
17930                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17931                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
17932                 MP_WritePhyUshort(sc, 0x1d, 0x8f07);
17933                 MP_WritePhyUshort(sc, 0x1d, 0xd2a0);
17934                 MP_WritePhyUshort(sc, 0x1d, 0x004c);
17935                 MP_WritePhyUshort(sc, 0x1d, 0x9205);
17936                 MP_WritePhyUshort(sc, 0x1d, 0xa043);
17937                 MP_WritePhyUshort(sc, 0x1d, 0x312b);
17938                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
17939                 MP_WritePhyUshort(sc, 0x1d, 0x30f1);
17940                 MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
17941                 MP_WritePhyUshort(sc, 0x1d, 0x4e60);
17942                 MP_WritePhyUshort(sc, 0x1d, 0x489c);
17943                 MP_WritePhyUshort(sc, 0x1d, 0x4628);
17944                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17945                 MP_WritePhyUshort(sc, 0x1d, 0x4e60);
17946                 MP_WritePhyUshort(sc, 0x1d, 0x7e28);
17947                 MP_WritePhyUshort(sc, 0x1d, 0x4628);
17948                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
17949                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
17950                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
17951                 MP_WritePhyUshort(sc, 0x1d, 0x5800);
17952                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
17953                 MP_WritePhyUshort(sc, 0x1d, 0x5c00);
17954                 MP_WritePhyUshort(sc, 0x1d, 0x41e8);
17955                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17956                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
17957                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17958                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
17959                 MP_WritePhyUshort(sc, 0x1d, 0x8fec);
17960                 MP_WritePhyUshort(sc, 0x1d, 0xb241);
17961                 MP_WritePhyUshort(sc, 0x1d, 0xa02a);
17962                 MP_WritePhyUshort(sc, 0x1d, 0x3146);
17963                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
17964                 MP_WritePhyUshort(sc, 0x1d, 0x4ea0);
17965                 MP_WritePhyUshort(sc, 0x1d, 0x7c02);
17966                 MP_WritePhyUshort(sc, 0x1d, 0x4402);
17967                 MP_WritePhyUshort(sc, 0x1d, 0x4448);
17968                 MP_WritePhyUshort(sc, 0x1d, 0x4894);
17969                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17970                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
17971                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17972                 MP_WritePhyUshort(sc, 0x1d, 0x4c03);
17973                 MP_WritePhyUshort(sc, 0x1d, 0x4824);
17974                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17975                 MP_WritePhyUshort(sc, 0x1d, 0x4c07);
17976                 MP_WritePhyUshort(sc, 0x1d, 0x41ef);
17977                 MP_WritePhyUshort(sc, 0x1d, 0x41ff);
17978                 MP_WritePhyUshort(sc, 0x1d, 0x4891);
17979                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17980                 MP_WritePhyUshort(sc, 0x1d, 0x4c07);
17981                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
17982                 MP_WritePhyUshort(sc, 0x1d, 0x4c17);
17983                 MP_WritePhyUshort(sc, 0x1d, 0x8400);
17984                 MP_WritePhyUshort(sc, 0x1d, 0x8ef8);
17985                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
17986                 MP_WritePhyUshort(sc, 0x1d, 0x8fd1);
17987                 MP_WritePhyUshort(sc, 0x1d, 0x92d5);
17988                 MP_WritePhyUshort(sc, 0x1d, 0xa10f);
17989                 MP_WritePhyUshort(sc, 0x1d, 0xd480);
17990                 MP_WritePhyUshort(sc, 0x1d, 0x0008);
17991                 MP_WritePhyUshort(sc, 0x1d, 0xd580);
17992                 MP_WritePhyUshort(sc, 0x1d, 0xffb7);
17993                 MP_WritePhyUshort(sc, 0x1d, 0xa202);
17994                 MP_WritePhyUshort(sc, 0x1d, 0x3161);
17995                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
17996                 MP_WritePhyUshort(sc, 0x1d, 0x4404);
17997                 MP_WritePhyUshort(sc, 0x1d, 0x3161);
17998                 MP_WritePhyUshort(sc, 0x1d, 0xd484);
17999                 MP_WritePhyUshort(sc, 0x1d, 0xfff3);
18000                 MP_WritePhyUshort(sc, 0x1d, 0xd484);
18001                 MP_WritePhyUshort(sc, 0x1d, 0xfff1);
18002                 MP_WritePhyUshort(sc, 0x1d, 0x30f1);
18003                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18004                 MP_WritePhyUshort(sc, 0x1d, 0x4ee0);
18005                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
18006                 MP_WritePhyUshort(sc, 0x1d, 0x5400);
18007                 MP_WritePhyUshort(sc, 0x1d, 0x4488);
18008                 MP_WritePhyUshort(sc, 0x1d, 0x41cf);
18009                 MP_WritePhyUshort(sc, 0x1d, 0x30f1);
18010                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18011                 MP_WritePhyUshort(sc, 0x1d, 0x4ec0);
18012                 MP_WritePhyUshort(sc, 0x1d, 0x48f3);
18013                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18014                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
18015                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18016                 MP_WritePhyUshort(sc, 0x1d, 0x4c09);
18017                 MP_WritePhyUshort(sc, 0x1d, 0x4508);
18018                 MP_WritePhyUshort(sc, 0x1d, 0x41c7);
18019                 MP_WritePhyUshort(sc, 0x1d, 0x8fb0);
18020                 MP_WritePhyUshort(sc, 0x1d, 0xd218);
18021                 MP_WritePhyUshort(sc, 0x1d, 0xffae);
18022                 MP_WritePhyUshort(sc, 0x1d, 0xd2a4);
18023                 MP_WritePhyUshort(sc, 0x1d, 0xff9d);
18024                 MP_WritePhyUshort(sc, 0x1d, 0x3182);
18025                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18026                 MP_WritePhyUshort(sc, 0x1d, 0x4e80);
18027                 MP_WritePhyUshort(sc, 0x1d, 0x4832);
18028                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18029                 MP_WritePhyUshort(sc, 0x1d, 0x4c01);
18030                 MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18031                 MP_WritePhyUshort(sc, 0x1d, 0x4c11);
18032                 MP_WritePhyUshort(sc, 0x1d, 0x4428);
18033                 MP_WritePhyUshort(sc, 0x1d, 0x7c40);
18034                 MP_WritePhyUshort(sc, 0x1d, 0x5440);
18035                 MP_WritePhyUshort(sc, 0x1d, 0x7c01);
18036                 MP_WritePhyUshort(sc, 0x1d, 0x5801);
18037                 MP_WritePhyUshort(sc, 0x1d, 0x7c04);
18038                 MP_WritePhyUshort(sc, 0x1d, 0x5c04);
18039                 MP_WritePhyUshort(sc, 0x1d, 0x41e8);
18040                 MP_WritePhyUshort(sc, 0x1d, 0xa4b3);
18041                 MP_WritePhyUshort(sc, 0x1d, 0x3197);
18042                 MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18043                 MP_WritePhyUshort(sc, 0x1d, 0x4f20);
18044                 MP_WritePhyUshort(sc, 0x1d, 0x6800);
18045                 MP_WritePhyUshort(sc, 0x1d, 0x6736);
18046                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
18047                 MP_WritePhyUshort(sc, 0x1d, 0x0000);
18048                 MP_WritePhyUshort(sc, 0x1d, 0x570f);
18049                 MP_WritePhyUshort(sc, 0x1d, 0x5fff);
18050                 MP_WritePhyUshort(sc, 0x1d, 0xaa03);
18051                 MP_WritePhyUshort(sc, 0x1d, 0x585b);
18052                 MP_WritePhyUshort(sc, 0x1d, 0x31a5);
18053                 MP_WritePhyUshort(sc, 0x1d, 0x5867);
18054                 MP_WritePhyUshort(sc, 0x1d, 0xbcf4);
18055                 MP_WritePhyUshort(sc, 0x1d, 0x300b);
18056                 MP_WritePhyUshort(sc, 0x1f, 0x0004);
18057                 MP_WritePhyUshort(sc, 0x1c, 0x0200);
18058                 MP_WritePhyUshort(sc, 0x19, 0x7030);
18059                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
18060
18061                 if (phy_power_saving == 1) {
18062                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
18063                         MP_WritePhyUshort(sc, 0x18, 0x8310);
18064                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
18065                 } else {
18066                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
18067                         MP_WritePhyUshort(sc, 0x18, 0x0310);
18068                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
18069                         DELAY(20000);
18070                 }
18071
18072                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
18073                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
18074                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
18075                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
18076                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
18077                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
18078         } else if (sc->re_type == MACFG_54 || sc->re_type == MACFG_55) {
18079                 Data_u32 = re_eri_read(sc, 0x1D0, 4, ERIAR_ExGMAC);
18080                 Data_u32 &= 0xFFFF0000;
18081                 re_eri_write(sc, 0x1D0, 4, Data_u32, ERIAR_ExGMAC);
18082
18083                 if (sc->re_type == MACFG_55) {
18084                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
18085                         MP_WritePhyUshort(sc, 0x18, 0x0310);
18086                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
18087
18088                         MP_WritePhyUshort(sc, 0x1f, 0x0004);
18089                         MP_WritePhyUshort(sc, 0x1f, 0x0004);
18090                         MP_WritePhyUshort(sc, 0x19, 0x7070);
18091                         MP_WritePhyUshort(sc, 0x1c, 0x0600);
18092                         MP_WritePhyUshort(sc, 0x1d, 0x9700);
18093                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18094                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
18095                         MP_WritePhyUshort(sc, 0x1d, 0x4007);
18096                         MP_WritePhyUshort(sc, 0x1d, 0x4400);
18097                         MP_WritePhyUshort(sc, 0x1d, 0x4800);
18098                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18099                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
18100                         MP_WritePhyUshort(sc, 0x1d, 0x5310);
18101                         MP_WritePhyUshort(sc, 0x1d, 0x6000);
18102                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
18103                         MP_WritePhyUshort(sc, 0x1d, 0x673e);
18104                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18105                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18106                         MP_WritePhyUshort(sc, 0x1d, 0x571f);
18107                         MP_WritePhyUshort(sc, 0x1d, 0x5ffb);
18108                         MP_WritePhyUshort(sc, 0x1d, 0xaa04);
18109                         MP_WritePhyUshort(sc, 0x1d, 0x5b58);
18110                         MP_WritePhyUshort(sc, 0x1d, 0x6100);
18111                         MP_WritePhyUshort(sc, 0x1d, 0x3016);
18112                         MP_WritePhyUshort(sc, 0x1d, 0x5b64);
18113                         MP_WritePhyUshort(sc, 0x1d, 0x6080);
18114                         MP_WritePhyUshort(sc, 0x1d, 0xa6fa);
18115                         MP_WritePhyUshort(sc, 0x1d, 0xdcdb);
18116                         MP_WritePhyUshort(sc, 0x1d, 0x0015);
18117                         MP_WritePhyUshort(sc, 0x1d, 0xb915);
18118                         MP_WritePhyUshort(sc, 0x1d, 0xb511);
18119                         MP_WritePhyUshort(sc, 0x1d, 0xd16b);
18120                         MP_WritePhyUshort(sc, 0x1d, 0x000f);
18121                         MP_WritePhyUshort(sc, 0x1d, 0xb40f);
18122                         MP_WritePhyUshort(sc, 0x1d, 0xd06b);
18123                         MP_WritePhyUshort(sc, 0x1d, 0x000d);
18124                         MP_WritePhyUshort(sc, 0x1d, 0xb206);
18125                         MP_WritePhyUshort(sc, 0x1d, 0x7c01);
18126                         MP_WritePhyUshort(sc, 0x1d, 0x5800);
18127                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
18128                         MP_WritePhyUshort(sc, 0x1d, 0x5c00);
18129                         MP_WritePhyUshort(sc, 0x1d, 0x3010);
18130                         MP_WritePhyUshort(sc, 0x1d, 0x7c01);
18131                         MP_WritePhyUshort(sc, 0x1d, 0x5801);
18132                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
18133                         MP_WritePhyUshort(sc, 0x1d, 0x5c04);
18134                         MP_WritePhyUshort(sc, 0x1d, 0x3016);
18135                         MP_WritePhyUshort(sc, 0x1d, 0x307e);
18136                         MP_WritePhyUshort(sc, 0x1d, 0x30f4);
18137                         MP_WritePhyUshort(sc, 0x1d, 0x319f);
18138                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18139                         MP_WritePhyUshort(sc, 0x1d, 0x4c60);
18140                         MP_WritePhyUshort(sc, 0x1d, 0x6803);
18141                         MP_WritePhyUshort(sc, 0x1d, 0x7d00);
18142                         MP_WritePhyUshort(sc, 0x1d, 0x6900);
18143                         MP_WritePhyUshort(sc, 0x1d, 0x6520);
18144                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18145                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18146                         MP_WritePhyUshort(sc, 0x1d, 0xaf03);
18147                         MP_WritePhyUshort(sc, 0x1d, 0x6115);
18148                         MP_WritePhyUshort(sc, 0x1d, 0x303a);
18149                         MP_WritePhyUshort(sc, 0x1d, 0x6097);
18150                         MP_WritePhyUshort(sc, 0x1d, 0x57e0);
18151                         MP_WritePhyUshort(sc, 0x1d, 0x580c);
18152                         MP_WritePhyUshort(sc, 0x1d, 0x588c);
18153                         MP_WritePhyUshort(sc, 0x1d, 0x5f80);
18154                         MP_WritePhyUshort(sc, 0x1d, 0x4827);
18155                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18156                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
18157                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18158                         MP_WritePhyUshort(sc, 0x1d, 0x4c10);
18159                         MP_WritePhyUshort(sc, 0x1d, 0x8400);
18160                         MP_WritePhyUshort(sc, 0x1d, 0x7c30);
18161                         MP_WritePhyUshort(sc, 0x1d, 0x6020);
18162                         MP_WritePhyUshort(sc, 0x1d, 0x48bf);
18163                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18164                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
18165                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18166                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
18167                         MP_WritePhyUshort(sc, 0x1d, 0xb802);
18168                         MP_WritePhyUshort(sc, 0x1d, 0x3053);
18169                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
18170                         MP_WritePhyUshort(sc, 0x1d, 0x6808);
18171                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18172                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18173                         MP_WritePhyUshort(sc, 0x1d, 0x7c10);
18174                         MP_WritePhyUshort(sc, 0x1d, 0x6810);
18175                         MP_WritePhyUshort(sc, 0x1d, 0xd6cf);
18176                         MP_WritePhyUshort(sc, 0x1d, 0x0002);
18177                         MP_WritePhyUshort(sc, 0x1d, 0x80fe);
18178                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18179                         MP_WritePhyUshort(sc, 0x1d, 0x4c80);
18180                         MP_WritePhyUshort(sc, 0x1d, 0x7c10);
18181                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
18182                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
18183                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
18184                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18185                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18186                         MP_WritePhyUshort(sc, 0x1d, 0x7c23);
18187                         MP_WritePhyUshort(sc, 0x1d, 0x5c23);
18188                         MP_WritePhyUshort(sc, 0x1d, 0x481e);
18189                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18190                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
18191                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18192                         MP_WritePhyUshort(sc, 0x1d, 0x4c02);
18193                         MP_WritePhyUshort(sc, 0x1d, 0x5310);
18194                         MP_WritePhyUshort(sc, 0x1d, 0x81ff);
18195                         MP_WritePhyUshort(sc, 0x1d, 0x30c1);
18196                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18197                         MP_WritePhyUshort(sc, 0x1d, 0x4d00);
18198                         MP_WritePhyUshort(sc, 0x1d, 0x4832);
18199                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18200                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
18201                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18202                         MP_WritePhyUshort(sc, 0x1d, 0x4c10);
18203                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
18204                         MP_WritePhyUshort(sc, 0x1d, 0x6000);
18205                         MP_WritePhyUshort(sc, 0x1d, 0xa4bd);
18206                         MP_WritePhyUshort(sc, 0x1d, 0xd9b3);
18207                         MP_WritePhyUshort(sc, 0x1d, 0x00fe);
18208                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18209                         MP_WritePhyUshort(sc, 0x1d, 0x4d20);
18210                         MP_WritePhyUshort(sc, 0x1d, 0x7e00);
18211                         MP_WritePhyUshort(sc, 0x1d, 0x6200);
18212                         MP_WritePhyUshort(sc, 0x1d, 0x3001);
18213                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18214                         MP_WritePhyUshort(sc, 0x1d, 0x4dc0);
18215                         MP_WritePhyUshort(sc, 0x1d, 0xd09d);
18216                         MP_WritePhyUshort(sc, 0x1d, 0x0002);
18217                         MP_WritePhyUshort(sc, 0x1d, 0xb4fe);
18218                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18219                         MP_WritePhyUshort(sc, 0x1d, 0x4d80);
18220                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
18221                         MP_WritePhyUshort(sc, 0x1d, 0x6004);
18222                         MP_WritePhyUshort(sc, 0x1d, 0x6802);
18223                         MP_WritePhyUshort(sc, 0x1d, 0x6728);
18224                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18225                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18226                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
18227                         MP_WritePhyUshort(sc, 0x1d, 0x6000);
18228                         MP_WritePhyUshort(sc, 0x1d, 0x486c);
18229                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18230                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
18231                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18232                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
18233                         MP_WritePhyUshort(sc, 0x1d, 0x9503);
18234                         MP_WritePhyUshort(sc, 0x1d, 0x7e00);
18235                         MP_WritePhyUshort(sc, 0x1d, 0x6200);
18236                         MP_WritePhyUshort(sc, 0x1d, 0x571f);
18237                         MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
18238                         MP_WritePhyUshort(sc, 0x1d, 0xaa05);
18239                         MP_WritePhyUshort(sc, 0x1d, 0x5b58);
18240                         MP_WritePhyUshort(sc, 0x1d, 0x7d80);
18241                         MP_WritePhyUshort(sc, 0x1d, 0x6100);
18242                         MP_WritePhyUshort(sc, 0x1d, 0x309a);
18243                         MP_WritePhyUshort(sc, 0x1d, 0x5b64);
18244                         MP_WritePhyUshort(sc, 0x1d, 0x7d80);
18245                         MP_WritePhyUshort(sc, 0x1d, 0x6080);
18246                         MP_WritePhyUshort(sc, 0x1d, 0xcdab);
18247                         MP_WritePhyUshort(sc, 0x1d, 0x0058);
18248                         MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
18249                         MP_WritePhyUshort(sc, 0x1d, 0x0056);
18250                         MP_WritePhyUshort(sc, 0x1d, 0xd96b);
18251                         MP_WritePhyUshort(sc, 0x1d, 0x0054);
18252                         MP_WritePhyUshort(sc, 0x1d, 0xd0a0);
18253                         MP_WritePhyUshort(sc, 0x1d, 0x00d8);
18254                         MP_WritePhyUshort(sc, 0x1d, 0xcba0);
18255                         MP_WritePhyUshort(sc, 0x1d, 0x0003);
18256                         MP_WritePhyUshort(sc, 0x1d, 0x80ec);
18257                         MP_WritePhyUshort(sc, 0x1d, 0x30a7);
18258                         MP_WritePhyUshort(sc, 0x1d, 0x30b4);
18259                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18260                         MP_WritePhyUshort(sc, 0x1d, 0x4ce0);
18261                         MP_WritePhyUshort(sc, 0x1d, 0x4832);
18262                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18263                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
18264                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18265                         MP_WritePhyUshort(sc, 0x1d, 0x4c08);
18266                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
18267                         MP_WritePhyUshort(sc, 0x1d, 0x6008);
18268                         MP_WritePhyUshort(sc, 0x1d, 0x8300);
18269                         MP_WritePhyUshort(sc, 0x1d, 0xb902);
18270                         MP_WritePhyUshort(sc, 0x1d, 0x307e);
18271                         MP_WritePhyUshort(sc, 0x1d, 0x3068);
18272                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18273                         MP_WritePhyUshort(sc, 0x1d, 0x4da0);
18274                         MP_WritePhyUshort(sc, 0x1d, 0x6608);
18275                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18276                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18277                         MP_WritePhyUshort(sc, 0x1d, 0x56a0);
18278                         MP_WritePhyUshort(sc, 0x1d, 0x590c);
18279                         MP_WritePhyUshort(sc, 0x1d, 0x5fa0);
18280                         MP_WritePhyUshort(sc, 0x1d, 0xcba4);
18281                         MP_WritePhyUshort(sc, 0x1d, 0x0004);
18282                         MP_WritePhyUshort(sc, 0x1d, 0xcd8d);
18283                         MP_WritePhyUshort(sc, 0x1d, 0x0002);
18284                         MP_WritePhyUshort(sc, 0x1d, 0x80fc);
18285                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18286                         MP_WritePhyUshort(sc, 0x1d, 0x4ca0);
18287                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
18288                         MP_WritePhyUshort(sc, 0x1d, 0x6408);
18289                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18290                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18291                         MP_WritePhyUshort(sc, 0x1d, 0x7d00);
18292                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
18293                         MP_WritePhyUshort(sc, 0x1d, 0xb603);
18294                         MP_WritePhyUshort(sc, 0x1d, 0x7c10);
18295                         MP_WritePhyUshort(sc, 0x1d, 0x6010);
18296                         MP_WritePhyUshort(sc, 0x1d, 0x7d1f);
18297                         MP_WritePhyUshort(sc, 0x1d, 0x551f);
18298                         MP_WritePhyUshort(sc, 0x1d, 0x5fb3);
18299                         MP_WritePhyUshort(sc, 0x1d, 0xaa05);
18300                         MP_WritePhyUshort(sc, 0x1d, 0x7c80);
18301                         MP_WritePhyUshort(sc, 0x1d, 0x5800);
18302                         MP_WritePhyUshort(sc, 0x1d, 0x5b58);
18303                         MP_WritePhyUshort(sc, 0x1d, 0x30d7);
18304                         MP_WritePhyUshort(sc, 0x1d, 0x7c80);
18305                         MP_WritePhyUshort(sc, 0x1d, 0x5800);
18306                         MP_WritePhyUshort(sc, 0x1d, 0x5b64);
18307                         MP_WritePhyUshort(sc, 0x1d, 0x4827);
18308                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18309                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
18310                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18311                         MP_WritePhyUshort(sc, 0x1d, 0x4c10);
18312                         MP_WritePhyUshort(sc, 0x1d, 0x8400);
18313                         MP_WritePhyUshort(sc, 0x1d, 0x7c10);
18314                         MP_WritePhyUshort(sc, 0x1d, 0x6000);
18315                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18316                         MP_WritePhyUshort(sc, 0x1d, 0x4cc0);
18317                         MP_WritePhyUshort(sc, 0x1d, 0x7d00);
18318                         MP_WritePhyUshort(sc, 0x1d, 0x6400);
18319                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18320                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18321                         MP_WritePhyUshort(sc, 0x1d, 0x5fbb);
18322                         MP_WritePhyUshort(sc, 0x1d, 0x4824);
18323                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18324                         MP_WritePhyUshort(sc, 0x1d, 0x4c00);
18325                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18326                         MP_WritePhyUshort(sc, 0x1d, 0x4c04);
18327                         MP_WritePhyUshort(sc, 0x1d, 0x8200);
18328                         MP_WritePhyUshort(sc, 0x1d, 0x7ce0);
18329                         MP_WritePhyUshort(sc, 0x1d, 0x5400);
18330                         MP_WritePhyUshort(sc, 0x1d, 0x7d00);
18331                         MP_WritePhyUshort(sc, 0x1d, 0x6500);
18332                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18333                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18334                         MP_WritePhyUshort(sc, 0x1d, 0x30a7);
18335                         MP_WritePhyUshort(sc, 0x1d, 0x3001);
18336                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18337                         MP_WritePhyUshort(sc, 0x1d, 0x4e00);
18338                         MP_WritePhyUshort(sc, 0x1d, 0x4007);
18339                         MP_WritePhyUshort(sc, 0x1d, 0x4400);
18340                         MP_WritePhyUshort(sc, 0x1d, 0x5310);
18341                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
18342                         MP_WritePhyUshort(sc, 0x1d, 0x673e);
18343                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18344                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18345                         MP_WritePhyUshort(sc, 0x1d, 0x570f);
18346                         MP_WritePhyUshort(sc, 0x1d, 0x5fff);
18347                         MP_WritePhyUshort(sc, 0x1d, 0xaa05);
18348                         MP_WritePhyUshort(sc, 0x1d, 0x585b);
18349                         MP_WritePhyUshort(sc, 0x1d, 0x7d80);
18350                         MP_WritePhyUshort(sc, 0x1d, 0x6100);
18351                         MP_WritePhyUshort(sc, 0x1d, 0x3107);
18352                         MP_WritePhyUshort(sc, 0x1d, 0x5867);
18353                         MP_WritePhyUshort(sc, 0x1d, 0x7d80);
18354                         MP_WritePhyUshort(sc, 0x1d, 0x6080);
18355                         MP_WritePhyUshort(sc, 0x1d, 0x9403);
18356                         MP_WritePhyUshort(sc, 0x1d, 0x7e00);
18357                         MP_WritePhyUshort(sc, 0x1d, 0x6200);
18358                         MP_WritePhyUshort(sc, 0x1d, 0xcda3);
18359                         MP_WritePhyUshort(sc, 0x1d, 0x00e8);
18360                         MP_WritePhyUshort(sc, 0x1d, 0xcd85);
18361                         MP_WritePhyUshort(sc, 0x1d, 0x00e6);
18362                         MP_WritePhyUshort(sc, 0x1d, 0xd96b);
18363                         MP_WritePhyUshort(sc, 0x1d, 0x00e4);
18364                         MP_WritePhyUshort(sc, 0x1d, 0x96e4);
18365                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
18366                         MP_WritePhyUshort(sc, 0x1d, 0x673e);
18367                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18368                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18369                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18370                         MP_WritePhyUshort(sc, 0x1d, 0x4e20);
18371                         MP_WritePhyUshort(sc, 0x1d, 0x96dd);
18372                         MP_WritePhyUshort(sc, 0x1d, 0x8b04);
18373                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
18374                         MP_WritePhyUshort(sc, 0x1d, 0x5008);
18375                         MP_WritePhyUshort(sc, 0x1d, 0xab03);
18376                         MP_WritePhyUshort(sc, 0x1d, 0x7c08);
18377                         MP_WritePhyUshort(sc, 0x1d, 0x5000);
18378                         MP_WritePhyUshort(sc, 0x1d, 0x6801);
18379                         MP_WritePhyUshort(sc, 0x1d, 0x677e);
18380                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18381                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18382                         MP_WritePhyUshort(sc, 0x1d, 0xdb7c);
18383                         MP_WritePhyUshort(sc, 0x1d, 0x00ee);
18384                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18385                         MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
18386                         MP_WritePhyUshort(sc, 0x1d, 0x4e40);
18387                         MP_WritePhyUshort(sc, 0x1d, 0x4837);
18388                         MP_WritePhyUshort(sc, 0x1d, 0x4418);
18389                         MP_WritePhyUshort(sc, 0x1d, 0x41c7);
18390                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18391                         MP_WritePhyUshort(sc, 0x1d, 0x4e40);
18392                         MP_WritePhyUshort(sc, 0x1d, 0x7c40);
18393                         MP_WritePhyUshort(sc, 0x1d, 0x5400);
18394                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18395                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
18396                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18397                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
18398                         MP_WritePhyUshort(sc, 0x1d, 0x8fc2);
18399                         MP_WritePhyUshort(sc, 0x1d, 0xd2a0);
18400                         MP_WritePhyUshort(sc, 0x1d, 0x004b);
18401                         MP_WritePhyUshort(sc, 0x1d, 0x9204);
18402                         MP_WritePhyUshort(sc, 0x1d, 0xa042);
18403                         MP_WritePhyUshort(sc, 0x1d, 0x3132);
18404                         MP_WritePhyUshort(sc, 0x1d, 0x30f4);
18405                         MP_WritePhyUshort(sc, 0x1d, 0x7fe1);
18406                         MP_WritePhyUshort(sc, 0x1d, 0x4e60);
18407                         MP_WritePhyUshort(sc, 0x1d, 0x489c);
18408                         MP_WritePhyUshort(sc, 0x1d, 0x4628);
18409                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18410                         MP_WritePhyUshort(sc, 0x1d, 0x4e60);
18411                         MP_WritePhyUshort(sc, 0x1d, 0x7e28);
18412                         MP_WritePhyUshort(sc, 0x1d, 0x4628);
18413                         MP_WritePhyUshort(sc, 0x1d, 0x7c40);
18414                         MP_WritePhyUshort(sc, 0x1d, 0x5400);
18415                         MP_WritePhyUshort(sc, 0x1d, 0x7c01);
18416                         MP_WritePhyUshort(sc, 0x1d, 0x5800);
18417                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
18418                         MP_WritePhyUshort(sc, 0x1d, 0x5c00);
18419                         MP_WritePhyUshort(sc, 0x1d, 0x41e8);
18420                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18421                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
18422                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18423                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
18424                         MP_WritePhyUshort(sc, 0x1d, 0x8fa8);
18425                         MP_WritePhyUshort(sc, 0x1d, 0xb241);
18426                         MP_WritePhyUshort(sc, 0x1d, 0xa02a);
18427                         MP_WritePhyUshort(sc, 0x1d, 0x314c);
18428                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18429                         MP_WritePhyUshort(sc, 0x1d, 0x4ea0);
18430                         MP_WritePhyUshort(sc, 0x1d, 0x7c02);
18431                         MP_WritePhyUshort(sc, 0x1d, 0x4402);
18432                         MP_WritePhyUshort(sc, 0x1d, 0x4448);
18433                         MP_WritePhyUshort(sc, 0x1d, 0x4894);
18434                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18435                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
18436                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18437                         MP_WritePhyUshort(sc, 0x1d, 0x4c03);
18438                         MP_WritePhyUshort(sc, 0x1d, 0x4824);
18439                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18440                         MP_WritePhyUshort(sc, 0x1d, 0x4c07);
18441                         MP_WritePhyUshort(sc, 0x1d, 0x41ef);
18442                         MP_WritePhyUshort(sc, 0x1d, 0x41ff);
18443                         MP_WritePhyUshort(sc, 0x1d, 0x4891);
18444                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18445                         MP_WritePhyUshort(sc, 0x1d, 0x4c07);
18446                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18447                         MP_WritePhyUshort(sc, 0x1d, 0x4c17);
18448                         MP_WritePhyUshort(sc, 0x1d, 0x8400);
18449                         MP_WritePhyUshort(sc, 0x1d, 0x8ef8);
18450                         MP_WritePhyUshort(sc, 0x1d, 0x41c7);
18451                         MP_WritePhyUshort(sc, 0x1d, 0x8f8d);
18452                         MP_WritePhyUshort(sc, 0x1d, 0x92d5);
18453                         MP_WritePhyUshort(sc, 0x1d, 0xa10f);
18454                         MP_WritePhyUshort(sc, 0x1d, 0xd480);
18455                         MP_WritePhyUshort(sc, 0x1d, 0x0008);
18456                         MP_WritePhyUshort(sc, 0x1d, 0xd580);
18457                         MP_WritePhyUshort(sc, 0x1d, 0x00b8);
18458                         MP_WritePhyUshort(sc, 0x1d, 0xa202);
18459                         MP_WritePhyUshort(sc, 0x1d, 0x3167);
18460                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
18461                         MP_WritePhyUshort(sc, 0x1d, 0x4404);
18462                         MP_WritePhyUshort(sc, 0x1d, 0x3167);
18463                         MP_WritePhyUshort(sc, 0x1d, 0xd484);
18464                         MP_WritePhyUshort(sc, 0x1d, 0x00f3);
18465                         MP_WritePhyUshort(sc, 0x1d, 0xd484);
18466                         MP_WritePhyUshort(sc, 0x1d, 0x00f1);
18467                         MP_WritePhyUshort(sc, 0x1d, 0x30f4);
18468                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18469                         MP_WritePhyUshort(sc, 0x1d, 0x4ee0);
18470                         MP_WritePhyUshort(sc, 0x1d, 0x7c40);
18471                         MP_WritePhyUshort(sc, 0x1d, 0x5400);
18472                         MP_WritePhyUshort(sc, 0x1d, 0x4488);
18473                         MP_WritePhyUshort(sc, 0x1d, 0x41cf);
18474                         MP_WritePhyUshort(sc, 0x1d, 0x30f4);
18475                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18476                         MP_WritePhyUshort(sc, 0x1d, 0x4ec0);
18477                         MP_WritePhyUshort(sc, 0x1d, 0x48f3);
18478                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18479                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
18480                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18481                         MP_WritePhyUshort(sc, 0x1d, 0x4c09);
18482                         MP_WritePhyUshort(sc, 0x1d, 0x4508);
18483                         MP_WritePhyUshort(sc, 0x1d, 0x41c7);
18484                         MP_WritePhyUshort(sc, 0x1d, 0x8fb0);
18485                         MP_WritePhyUshort(sc, 0x1d, 0xd218);
18486                         MP_WritePhyUshort(sc, 0x1d, 0x00ae);
18487                         MP_WritePhyUshort(sc, 0x1d, 0xd2a4);
18488                         MP_WritePhyUshort(sc, 0x1d, 0x009e);
18489                         MP_WritePhyUshort(sc, 0x1d, 0x3188);
18490                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18491                         MP_WritePhyUshort(sc, 0x1d, 0x4e80);
18492                         MP_WritePhyUshort(sc, 0x1d, 0x4832);
18493                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18494                         MP_WritePhyUshort(sc, 0x1d, 0x4c01);
18495                         MP_WritePhyUshort(sc, 0x1d, 0x7c1f);
18496                         MP_WritePhyUshort(sc, 0x1d, 0x4c11);
18497                         MP_WritePhyUshort(sc, 0x1d, 0x4428);
18498                         MP_WritePhyUshort(sc, 0x1d, 0x7c40);
18499                         MP_WritePhyUshort(sc, 0x1d, 0x5440);
18500                         MP_WritePhyUshort(sc, 0x1d, 0x7c01);
18501                         MP_WritePhyUshort(sc, 0x1d, 0x5801);
18502                         MP_WritePhyUshort(sc, 0x1d, 0x7c04);
18503                         MP_WritePhyUshort(sc, 0x1d, 0x5c04);
18504                         MP_WritePhyUshort(sc, 0x1d, 0x41e8);
18505                         MP_WritePhyUshort(sc, 0x1d, 0xa4b3);
18506                         MP_WritePhyUshort(sc, 0x1d, 0x319d);
18507                         MP_WritePhyUshort(sc, 0x1d, 0x7fe0);
18508                         MP_WritePhyUshort(sc, 0x1d, 0x4f20);
18509                         MP_WritePhyUshort(sc, 0x1d, 0x6800);
18510                         MP_WritePhyUshort(sc, 0x1d, 0x673e);
18511                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18512                         MP_WritePhyUshort(sc, 0x1d, 0x0000);
18513                         MP_WritePhyUshort(sc, 0x1d, 0x570f);
18514                         MP_WritePhyUshort(sc, 0x1d, 0x5fff);
18515                         MP_WritePhyUshort(sc, 0x1d, 0xaa04);
18516                         MP_WritePhyUshort(sc, 0x1d, 0x585b);
18517                         MP_WritePhyUshort(sc, 0x1d, 0x6100);
18518                         MP_WritePhyUshort(sc, 0x1d, 0x31ad);
18519                         MP_WritePhyUshort(sc, 0x1d, 0x5867);
18520                         MP_WritePhyUshort(sc, 0x1d, 0x6080);
18521                         MP_WritePhyUshort(sc, 0x1d, 0xbcf2);
18522                         MP_WritePhyUshort(sc, 0x1d, 0x3001);
18523                         MP_WritePhyUshort(sc, 0x1f, 0x0004);
18524                         MP_WritePhyUshort(sc, 0x1c, 0x0200);
18525                         MP_WritePhyUshort(sc, 0x19, 0x7030);
18526                         MP_WritePhyUshort(sc, 0x1f, 0x0000);
18527                 }
18528
18529                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
18530                 MP_WritePhyUshort(sc, 0x11, 0x83BA);
18531                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
18532
18533                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
18534                 ClearEthPhyBit(sc, 0x1A, BIT_2);
18535                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
18536
18537                 if (phy_power_saving == 1) {
18538                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
18539                         MP_WritePhyUshort(sc, 0x18, 0x8310);
18540                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
18541                 } else {
18542                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
18543                         MP_WritePhyUshort(sc, 0x18, 0x0310);
18544                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
18545                         DELAY(20000);
18546                 }
18547
18548                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
18549                 MP_WritePhyUshort(sc, 0x0D, 0x0007);
18550                 MP_WritePhyUshort(sc, 0x0E, 0x003C);
18551                 MP_WritePhyUshort(sc, 0x0D, 0x4007);
18552                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
18553                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
18554                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
18555                 MP_WritePhyUshort(sc, 0x0D, 0x0003);
18556                 MP_WritePhyUshort(sc, 0x0E, 0x0015);
18557                 MP_WritePhyUshort(sc, 0x0D, 0x4003);
18558                 MP_WritePhyUshort(sc, 0x0E, 0x0000);
18559                 MP_WritePhyUshort(sc, 0x0D, 0x0000);
18560         } else if (sc->re_type == MACFG_56) {
18561                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
18562                 PhyRegValue = MP_ReadPhyUshort(sc,  0x10);
18563                 PhyRegValue |= BIT_4;
18564                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
18565
18566                 MP_WritePhyUshort(sc, 0x1f, 0x0B80);
18567                 WaitCnt = 0;
18568                 do {
18569                         PhyRegValue = MP_ReadPhyUshort(sc,  0x10);
18570                         PhyRegValue &= 0x0040;
18571                         DELAY(50);
18572                         DELAY(50);
18573                         WaitCnt++;
18574                 } while(PhyRegValue != 0x0040 && WaitCnt <1000);
18575
18576                 MP_WritePhyUshort(sc, 0x1f, 0x0A43);
18577                 MP_WritePhyUshort(sc, 0x13, 0x8146);
18578                 MP_WritePhyUshort(sc, 0x14, 0x2300);
18579                 MP_WritePhyUshort(sc, 0x13, 0xB820);
18580                 MP_WritePhyUshort(sc, 0x14, 0x0210);
18581
18582                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
18583                 MP_WritePhyUshort(sc, 0x13, 0xB820);
18584                 MP_WritePhyUshort(sc, 0x14, 0x0290);
18585                 MP_WritePhyUshort(sc, 0x13, 0xA012);
18586                 MP_WritePhyUshort(sc, 0x14, 0x0000);
18587                 MP_WritePhyUshort(sc, 0x13, 0xA014);
18588                 MP_WritePhyUshort(sc, 0x14, 0x2c04);
18589                 MP_WritePhyUshort(sc, 0x14, 0x2c0c);
18590                 MP_WritePhyUshort(sc, 0x14, 0x2c6c);
18591                 MP_WritePhyUshort(sc, 0x14, 0x2d0d);
18592                 MP_WritePhyUshort(sc, 0x14, 0x31ce);
18593                 MP_WritePhyUshort(sc, 0x14, 0x506d);
18594                 MP_WritePhyUshort(sc, 0x14, 0xd708);
18595                 MP_WritePhyUshort(sc, 0x14, 0x3108);
18596                 MP_WritePhyUshort(sc, 0x14, 0x106d);
18597                 MP_WritePhyUshort(sc, 0x14, 0x1560);
18598                 MP_WritePhyUshort(sc, 0x14, 0x15a9);
18599                 MP_WritePhyUshort(sc, 0x14, 0x206e);
18600                 MP_WritePhyUshort(sc, 0x14, 0x175b);
18601                 MP_WritePhyUshort(sc, 0x14, 0x6062);
18602                 MP_WritePhyUshort(sc, 0x14, 0xd700);
18603                 MP_WritePhyUshort(sc, 0x14, 0x5fae);
18604                 MP_WritePhyUshort(sc, 0x14, 0xd708);
18605                 MP_WritePhyUshort(sc, 0x14, 0x3107);
18606                 MP_WritePhyUshort(sc, 0x14, 0x4c1e);
18607                 MP_WritePhyUshort(sc, 0x14, 0x4169);
18608                 MP_WritePhyUshort(sc, 0x14, 0x316a);
18609                 MP_WritePhyUshort(sc, 0x14, 0x0c19);
18610                 MP_WritePhyUshort(sc, 0x14, 0x31aa);
18611                 MP_WritePhyUshort(sc, 0x14, 0x0c19);
18612                 MP_WritePhyUshort(sc, 0x14, 0x2c1b);
18613                 MP_WritePhyUshort(sc, 0x14, 0x5e62);
18614                 MP_WritePhyUshort(sc, 0x14, 0x26b5);
18615                 MP_WritePhyUshort(sc, 0x14, 0x31ab);
18616                 MP_WritePhyUshort(sc, 0x14, 0x5c1e);
18617                 MP_WritePhyUshort(sc, 0x14, 0x2c0c);
18618                 MP_WritePhyUshort(sc, 0x14, 0xc040);
18619                 MP_WritePhyUshort(sc, 0x14, 0x8808);
18620                 MP_WritePhyUshort(sc, 0x14, 0xc520);
18621                 MP_WritePhyUshort(sc, 0x14, 0xc421);
18622                 MP_WritePhyUshort(sc, 0x14, 0xd05a);
18623                 MP_WritePhyUshort(sc, 0x14, 0xd19a);
18624                 MP_WritePhyUshort(sc, 0x14, 0xd709);
18625                 MP_WritePhyUshort(sc, 0x14, 0x608f);
18626                 MP_WritePhyUshort(sc, 0x14, 0xd06b);
18627                 MP_WritePhyUshort(sc, 0x14, 0xd18a);
18628                 MP_WritePhyUshort(sc, 0x14, 0x2c2c);
18629                 MP_WritePhyUshort(sc, 0x14, 0xd0be);
18630                 MP_WritePhyUshort(sc, 0x14, 0xd188);
18631                 MP_WritePhyUshort(sc, 0x14, 0x2c2c);
18632                 MP_WritePhyUshort(sc, 0x14, 0xd708);
18633                 MP_WritePhyUshort(sc, 0x14, 0x4072);
18634                 MP_WritePhyUshort(sc, 0x14, 0xc104);
18635                 MP_WritePhyUshort(sc, 0x14, 0x2c3e);
18636                 MP_WritePhyUshort(sc, 0x14, 0x4076);
18637                 MP_WritePhyUshort(sc, 0x14, 0xc110);
18638                 MP_WritePhyUshort(sc, 0x14, 0x2c3e);
18639                 MP_WritePhyUshort(sc, 0x14, 0x4071);
18640                 MP_WritePhyUshort(sc, 0x14, 0xc102);
18641                 MP_WritePhyUshort(sc, 0x14, 0x2c3e);
18642                 MP_WritePhyUshort(sc, 0x14, 0x4070);
18643                 MP_WritePhyUshort(sc, 0x14, 0xc101);
18644                 MP_WritePhyUshort(sc, 0x14, 0x2c3e);
18645                 MP_WritePhyUshort(sc, 0x14, 0x175b);
18646                 MP_WritePhyUshort(sc, 0x14, 0xd709);
18647                 MP_WritePhyUshort(sc, 0x14, 0x3390);
18648                 MP_WritePhyUshort(sc, 0x14, 0x5c39);
18649                 MP_WritePhyUshort(sc, 0x14, 0x2c4e);
18650                 MP_WritePhyUshort(sc, 0x14, 0x175b);
18651                 MP_WritePhyUshort(sc, 0x14, 0xd708);
18652                 MP_WritePhyUshort(sc, 0x14, 0x6193);
18653                 MP_WritePhyUshort(sc, 0x14, 0xd709);
18654                 MP_WritePhyUshort(sc, 0x14, 0x5f9d);
18655                 MP_WritePhyUshort(sc, 0x14, 0x408b);
18656                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18657                 MP_WritePhyUshort(sc, 0x14, 0x6042);
18658                 MP_WritePhyUshort(sc, 0x14, 0xb401);
18659                 MP_WritePhyUshort(sc, 0x14, 0x175b);
18660                 MP_WritePhyUshort(sc, 0x14, 0xd708);
18661                 MP_WritePhyUshort(sc, 0x14, 0x6073);
18662                 MP_WritePhyUshort(sc, 0x14, 0x5fbc);
18663                 MP_WritePhyUshort(sc, 0x14, 0x2c4d);
18664                 MP_WritePhyUshort(sc, 0x14, 0x26ed);
18665                 MP_WritePhyUshort(sc, 0x14, 0xb280);
18666                 MP_WritePhyUshort(sc, 0x14, 0xa841);
18667                 MP_WritePhyUshort(sc, 0x14, 0x9420);
18668                 MP_WritePhyUshort(sc, 0x14, 0x8710);
18669                 MP_WritePhyUshort(sc, 0x14, 0xd709);
18670                 MP_WritePhyUshort(sc, 0x14, 0x42ec);
18671                 MP_WritePhyUshort(sc, 0x14, 0x606d);
18672                 MP_WritePhyUshort(sc, 0x14, 0xd207);
18673                 MP_WritePhyUshort(sc, 0x14, 0x2c57);
18674                 MP_WritePhyUshort(sc, 0x14, 0xd203);
18675                 MP_WritePhyUshort(sc, 0x14, 0x33ff);
18676                 MP_WritePhyUshort(sc, 0x14, 0x563b);
18677                 MP_WritePhyUshort(sc, 0x14, 0x3275);
18678                 MP_WritePhyUshort(sc, 0x14, 0x7c5e);
18679                 MP_WritePhyUshort(sc, 0x14, 0xb240);
18680                 MP_WritePhyUshort(sc, 0x14, 0xb402);
18681                 MP_WritePhyUshort(sc, 0x14, 0x263b);
18682                 MP_WritePhyUshort(sc, 0x14, 0x6096);
18683                 MP_WritePhyUshort(sc, 0x14, 0xb240);
18684                 MP_WritePhyUshort(sc, 0x14, 0xb406);
18685                 MP_WritePhyUshort(sc, 0x14, 0x263b);
18686                 MP_WritePhyUshort(sc, 0x14, 0x31d7);
18687                 MP_WritePhyUshort(sc, 0x14, 0x7c67);
18688                 MP_WritePhyUshort(sc, 0x14, 0xb240);
18689                 MP_WritePhyUshort(sc, 0x14, 0xb40e);
18690                 MP_WritePhyUshort(sc, 0x14, 0x263b);
18691                 MP_WritePhyUshort(sc, 0x14, 0xb410);
18692                 MP_WritePhyUshort(sc, 0x14, 0x8802);
18693                 MP_WritePhyUshort(sc, 0x14, 0xb240);
18694                 MP_WritePhyUshort(sc, 0x14, 0x940e);
18695                 MP_WritePhyUshort(sc, 0x14, 0x263b);
18696                 MP_WritePhyUshort(sc, 0x14, 0xba04);
18697                 MP_WritePhyUshort(sc, 0x14, 0x1cd6);
18698                 MP_WritePhyUshort(sc, 0x14, 0xa902);
18699                 MP_WritePhyUshort(sc, 0x14, 0xd711);
18700                 MP_WritePhyUshort(sc, 0x14, 0x4045);
18701                 MP_WritePhyUshort(sc, 0x14, 0xa980);
18702                 MP_WritePhyUshort(sc, 0x14, 0x3003);
18703                 MP_WritePhyUshort(sc, 0x14, 0x59b1);
18704                 MP_WritePhyUshort(sc, 0x14, 0xa540);
18705                 MP_WritePhyUshort(sc, 0x14, 0xa601);
18706                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18707                 MP_WritePhyUshort(sc, 0x14, 0x4043);
18708                 MP_WritePhyUshort(sc, 0x14, 0xa910);
18709                 MP_WritePhyUshort(sc, 0x14, 0xd711);
18710                 MP_WritePhyUshort(sc, 0x14, 0x60a0);
18711                 MP_WritePhyUshort(sc, 0x14, 0xca33);
18712                 MP_WritePhyUshort(sc, 0x14, 0xcb33);
18713                 MP_WritePhyUshort(sc, 0x14, 0xa941);
18714                 MP_WritePhyUshort(sc, 0x14, 0x2c82);
18715                 MP_WritePhyUshort(sc, 0x14, 0xcaff);
18716                 MP_WritePhyUshort(sc, 0x14, 0xcbff);
18717                 MP_WritePhyUshort(sc, 0x14, 0xa921);
18718                 MP_WritePhyUshort(sc, 0x14, 0xce02);
18719                 MP_WritePhyUshort(sc, 0x14, 0xe070);
18720                 MP_WritePhyUshort(sc, 0x14, 0x0f10);
18721                 MP_WritePhyUshort(sc, 0x14, 0xaf01);
18722                 MP_WritePhyUshort(sc, 0x14, 0x8f01);
18723                 MP_WritePhyUshort(sc, 0x14, 0x1766);
18724                 MP_WritePhyUshort(sc, 0x14, 0x8e02);
18725                 MP_WritePhyUshort(sc, 0x14, 0x1787);
18726                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18727                 MP_WritePhyUshort(sc, 0x14, 0x609c);
18728                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18729                 MP_WritePhyUshort(sc, 0x14, 0x7fa4);
18730                 MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18731                 MP_WritePhyUshort(sc, 0x14, 0x1ce9);
18732                 MP_WritePhyUshort(sc, 0x14, 0xce04);
18733                 MP_WritePhyUshort(sc, 0x14, 0xe070);
18734                 MP_WritePhyUshort(sc, 0x14, 0x0f20);
18735                 MP_WritePhyUshort(sc, 0x14, 0xaf01);
18736                 MP_WritePhyUshort(sc, 0x14, 0x8f01);
18737                 MP_WritePhyUshort(sc, 0x14, 0x1766);
18738                 MP_WritePhyUshort(sc, 0x14, 0x8e04);
18739                 MP_WritePhyUshort(sc, 0x14, 0x6044);
18740                 MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18741                 MP_WritePhyUshort(sc, 0x14, 0xa520);
18742                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18743                 MP_WritePhyUshort(sc, 0x14, 0x4043);
18744                 MP_WritePhyUshort(sc, 0x14, 0x2cc1);
18745                 MP_WritePhyUshort(sc, 0x14, 0xe00f);
18746                 MP_WritePhyUshort(sc, 0x14, 0x0501);
18747                 MP_WritePhyUshort(sc, 0x14, 0x1cef);
18748                 MP_WritePhyUshort(sc, 0x14, 0xb801);
18749                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18750                 MP_WritePhyUshort(sc, 0x14, 0x4060);
18751                 MP_WritePhyUshort(sc, 0x14, 0x7fc4);
18752                 MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18753                 MP_WritePhyUshort(sc, 0x14, 0x1cf5);
18754                 MP_WritePhyUshort(sc, 0x14, 0xe00f);
18755                 MP_WritePhyUshort(sc, 0x14, 0x0502);
18756                 MP_WritePhyUshort(sc, 0x14, 0x1cef);
18757                 MP_WritePhyUshort(sc, 0x14, 0xb802);
18758                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18759                 MP_WritePhyUshort(sc, 0x14, 0x4061);
18760                 MP_WritePhyUshort(sc, 0x14, 0x7fc4);
18761                 MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18762                 MP_WritePhyUshort(sc, 0x14, 0x1cf5);
18763                 MP_WritePhyUshort(sc, 0x14, 0xe00f);
18764                 MP_WritePhyUshort(sc, 0x14, 0x0504);
18765                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18766                 MP_WritePhyUshort(sc, 0x14, 0x6099);
18767                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18768                 MP_WritePhyUshort(sc, 0x14, 0x7fa4);
18769                 MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18770                 MP_WritePhyUshort(sc, 0x14, 0xc17f);
18771                 MP_WritePhyUshort(sc, 0x14, 0xc200);
18772                 MP_WritePhyUshort(sc, 0x14, 0xc43f);
18773                 MP_WritePhyUshort(sc, 0x14, 0xcc03);
18774                 MP_WritePhyUshort(sc, 0x14, 0xa701);
18775                 MP_WritePhyUshort(sc, 0x14, 0xa510);
18776                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18777                 MP_WritePhyUshort(sc, 0x14, 0x4018);
18778                 MP_WritePhyUshort(sc, 0x14, 0x9910);
18779                 MP_WritePhyUshort(sc, 0x14, 0x8510);
18780                 MP_WritePhyUshort(sc, 0x14, 0x2860);
18781                 MP_WritePhyUshort(sc, 0x14, 0xe00f);
18782                 MP_WritePhyUshort(sc, 0x14, 0x0504);
18783                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18784                 MP_WritePhyUshort(sc, 0x14, 0x6099);
18785                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18786                 MP_WritePhyUshort(sc, 0x14, 0x7fa4);
18787                 MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18788                 MP_WritePhyUshort(sc, 0x14, 0xa608);
18789                 MP_WritePhyUshort(sc, 0x14, 0xc17d);
18790                 MP_WritePhyUshort(sc, 0x14, 0xc200);
18791                 MP_WritePhyUshort(sc, 0x14, 0xc43f);
18792                 MP_WritePhyUshort(sc, 0x14, 0xcc03);
18793                 MP_WritePhyUshort(sc, 0x14, 0xa701);
18794                 MP_WritePhyUshort(sc, 0x14, 0xa510);
18795                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18796                 MP_WritePhyUshort(sc, 0x14, 0x4018);
18797                 MP_WritePhyUshort(sc, 0x14, 0x9910);
18798                 MP_WritePhyUshort(sc, 0x14, 0x8510);
18799                 MP_WritePhyUshort(sc, 0x14, 0x2926);
18800                 MP_WritePhyUshort(sc, 0x14, 0x1792);
18801                 MP_WritePhyUshort(sc, 0x14, 0x27db);
18802                 MP_WritePhyUshort(sc, 0x14, 0xc000);
18803                 MP_WritePhyUshort(sc, 0x14, 0xc100);
18804                 MP_WritePhyUshort(sc, 0x14, 0xc200);
18805                 MP_WritePhyUshort(sc, 0x14, 0xc300);
18806                 MP_WritePhyUshort(sc, 0x14, 0xc400);
18807                 MP_WritePhyUshort(sc, 0x14, 0xc500);
18808                 MP_WritePhyUshort(sc, 0x14, 0xc600);
18809                 MP_WritePhyUshort(sc, 0x14, 0xc7c1);
18810                 MP_WritePhyUshort(sc, 0x14, 0xc800);
18811                 MP_WritePhyUshort(sc, 0x14, 0xcc00);
18812                 MP_WritePhyUshort(sc, 0x14, 0x0800);
18813                 MP_WritePhyUshort(sc, 0x14, 0xca0f);
18814                 MP_WritePhyUshort(sc, 0x14, 0xcbff);
18815                 MP_WritePhyUshort(sc, 0x14, 0xa901);
18816                 MP_WritePhyUshort(sc, 0x14, 0x8902);
18817                 MP_WritePhyUshort(sc, 0x14, 0xc900);
18818                 MP_WritePhyUshort(sc, 0x14, 0xca00);
18819                 MP_WritePhyUshort(sc, 0x14, 0xcb00);
18820                 MP_WritePhyUshort(sc, 0x14, 0x0800);
18821                 MP_WritePhyUshort(sc, 0x14, 0xb804);
18822                 MP_WritePhyUshort(sc, 0x14, 0x0800);
18823                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18824                 MP_WritePhyUshort(sc, 0x14, 0x6044);
18825                 MP_WritePhyUshort(sc, 0x14, 0x9804);
18826                 MP_WritePhyUshort(sc, 0x14, 0x0800);
18827                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18828                 MP_WritePhyUshort(sc, 0x14, 0x6099);
18829                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18830                 MP_WritePhyUshort(sc, 0x14, 0x7fa4);
18831                 MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18832                 MP_WritePhyUshort(sc, 0x14, 0x0800);
18833                 MP_WritePhyUshort(sc, 0x14, 0xa510);
18834                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18835                 MP_WritePhyUshort(sc, 0x14, 0x6098);
18836                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18837                 MP_WritePhyUshort(sc, 0x14, 0x7fa4);
18838                 MP_WritePhyUshort(sc, 0x14, 0x2cd4);
18839                 MP_WritePhyUshort(sc, 0x14, 0x8510);
18840                 MP_WritePhyUshort(sc, 0x14, 0x0800);
18841                 MP_WritePhyUshort(sc, 0x14, 0xd711);
18842                 MP_WritePhyUshort(sc, 0x14, 0x3003);
18843                 MP_WritePhyUshort(sc, 0x14, 0x1d01);
18844                 MP_WritePhyUshort(sc, 0x14, 0x2d0b);
18845                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18846                 MP_WritePhyUshort(sc, 0x14, 0x60be);
18847                 MP_WritePhyUshort(sc, 0x14, 0xe060);
18848                 MP_WritePhyUshort(sc, 0x14, 0x0920);
18849                 MP_WritePhyUshort(sc, 0x14, 0x1cd6);
18850                 MP_WritePhyUshort(sc, 0x14, 0x2c89);
18851                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18852                 MP_WritePhyUshort(sc, 0x14, 0x3063);
18853                 MP_WritePhyUshort(sc, 0x14, 0x1948);
18854                 MP_WritePhyUshort(sc, 0x14, 0x288a);
18855                 MP_WritePhyUshort(sc, 0x14, 0x1cd6);
18856                 MP_WritePhyUshort(sc, 0x14, 0x29bd);
18857                 MP_WritePhyUshort(sc, 0x14, 0xa802);
18858                 MP_WritePhyUshort(sc, 0x14, 0xa303);
18859                 MP_WritePhyUshort(sc, 0x14, 0x843f);
18860                 MP_WritePhyUshort(sc, 0x14, 0x81ff);
18861                 MP_WritePhyUshort(sc, 0x14, 0x8208);
18862                 MP_WritePhyUshort(sc, 0x14, 0xa201);
18863                 MP_WritePhyUshort(sc, 0x14, 0xc001);
18864                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18865                 MP_WritePhyUshort(sc, 0x14, 0x30a0);
18866                 MP_WritePhyUshort(sc, 0x14, 0x0d1c);
18867                 MP_WritePhyUshort(sc, 0x14, 0x30a0);
18868                 MP_WritePhyUshort(sc, 0x14, 0x3d13);
18869                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18870                 MP_WritePhyUshort(sc, 0x14, 0x7f4c);
18871                 MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18872                 MP_WritePhyUshort(sc, 0x14, 0xe003);
18873                 MP_WritePhyUshort(sc, 0x14, 0x0202);
18874                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18875                 MP_WritePhyUshort(sc, 0x14, 0x6090);
18876                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18877                 MP_WritePhyUshort(sc, 0x14, 0x7fac);
18878                 MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18879                 MP_WritePhyUshort(sc, 0x14, 0xa20c);
18880                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18881                 MP_WritePhyUshort(sc, 0x14, 0x6091);
18882                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18883                 MP_WritePhyUshort(sc, 0x14, 0x7fac);
18884                 MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18885                 MP_WritePhyUshort(sc, 0x14, 0x820e);
18886                 MP_WritePhyUshort(sc, 0x14, 0xa3e0);
18887                 MP_WritePhyUshort(sc, 0x14, 0xa520);
18888                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18889                 MP_WritePhyUshort(sc, 0x14, 0x609d);
18890                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18891                 MP_WritePhyUshort(sc, 0x14, 0x7fac);
18892                 MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18893                 MP_WritePhyUshort(sc, 0x14, 0x8520);
18894                 MP_WritePhyUshort(sc, 0x14, 0x6703);
18895                 MP_WritePhyUshort(sc, 0x14, 0x2d34);
18896                 MP_WritePhyUshort(sc, 0x14, 0xa13e);
18897                 MP_WritePhyUshort(sc, 0x14, 0xc001);
18898                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18899                 MP_WritePhyUshort(sc, 0x14, 0x4000);
18900                 MP_WritePhyUshort(sc, 0x14, 0x6046);
18901                 MP_WritePhyUshort(sc, 0x14, 0x2d0d);
18902                 MP_WritePhyUshort(sc, 0x14, 0xa43f);
18903                 MP_WritePhyUshort(sc, 0x14, 0xa101);
18904                 MP_WritePhyUshort(sc, 0x14, 0xc020);
18905                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18906                 MP_WritePhyUshort(sc, 0x14, 0x3121);
18907                 MP_WritePhyUshort(sc, 0x14, 0x0d45);
18908                 MP_WritePhyUshort(sc, 0x14, 0x30c0);
18909                 MP_WritePhyUshort(sc, 0x14, 0x3d0d);
18910                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18911                 MP_WritePhyUshort(sc, 0x14, 0x7f4c);
18912                 MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18913                 MP_WritePhyUshort(sc, 0x14, 0xa540);
18914                 MP_WritePhyUshort(sc, 0x14, 0xc001);
18915                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18916                 MP_WritePhyUshort(sc, 0x14, 0x4001);
18917                 MP_WritePhyUshort(sc, 0x14, 0xe00f);
18918                 MP_WritePhyUshort(sc, 0x14, 0x0501);
18919                 MP_WritePhyUshort(sc, 0x14, 0x1dac);
18920                 MP_WritePhyUshort(sc, 0x14, 0xc1c4);
18921                 MP_WritePhyUshort(sc, 0x14, 0xa268);
18922                 MP_WritePhyUshort(sc, 0x14, 0xa303);
18923                 MP_WritePhyUshort(sc, 0x14, 0x8420);
18924                 MP_WritePhyUshort(sc, 0x14, 0xe00f);
18925                 MP_WritePhyUshort(sc, 0x14, 0x0502);
18926                 MP_WritePhyUshort(sc, 0x14, 0x1dac);
18927                 MP_WritePhyUshort(sc, 0x14, 0xc002);
18928                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18929                 MP_WritePhyUshort(sc, 0x14, 0x4000);
18930                 MP_WritePhyUshort(sc, 0x14, 0x8208);
18931                 MP_WritePhyUshort(sc, 0x14, 0x8410);
18932                 MP_WritePhyUshort(sc, 0x14, 0xa121);
18933                 MP_WritePhyUshort(sc, 0x14, 0xc002);
18934                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18935                 MP_WritePhyUshort(sc, 0x14, 0x4000);
18936                 MP_WritePhyUshort(sc, 0x14, 0x8120);
18937                 MP_WritePhyUshort(sc, 0x14, 0x8180);
18938                 MP_WritePhyUshort(sc, 0x14, 0x1d97);
18939                 MP_WritePhyUshort(sc, 0x14, 0xa180);
18940                 MP_WritePhyUshort(sc, 0x14, 0xa13a);
18941                 MP_WritePhyUshort(sc, 0x14, 0x8240);
18942                 MP_WritePhyUshort(sc, 0x14, 0xa430);
18943                 MP_WritePhyUshort(sc, 0x14, 0xc010);
18944                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18945                 MP_WritePhyUshort(sc, 0x14, 0x30e1);
18946                 MP_WritePhyUshort(sc, 0x14, 0x0abc);
18947                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18948                 MP_WritePhyUshort(sc, 0x14, 0x7f8c);
18949                 MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18950                 MP_WritePhyUshort(sc, 0x14, 0xa480);
18951                 MP_WritePhyUshort(sc, 0x14, 0xa230);
18952                 MP_WritePhyUshort(sc, 0x14, 0xa303);
18953                 MP_WritePhyUshort(sc, 0x14, 0xc001);
18954                 MP_WritePhyUshort(sc, 0x14, 0xd70c);
18955                 MP_WritePhyUshort(sc, 0x14, 0x4124);
18956                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18957                 MP_WritePhyUshort(sc, 0x14, 0x6120);
18958                 MP_WritePhyUshort(sc, 0x14, 0xd711);
18959                 MP_WritePhyUshort(sc, 0x14, 0x3128);
18960                 MP_WritePhyUshort(sc, 0x14, 0x3d76);
18961                 MP_WritePhyUshort(sc, 0x14, 0x2d70);
18962                 MP_WritePhyUshort(sc, 0x14, 0xa801);
18963                 MP_WritePhyUshort(sc, 0x14, 0x2d6c);
18964                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18965                 MP_WritePhyUshort(sc, 0x14, 0x4000);
18966                 MP_WritePhyUshort(sc, 0x14, 0xe018);
18967                 MP_WritePhyUshort(sc, 0x14, 0x0208);
18968                 MP_WritePhyUshort(sc, 0x14, 0xa1f8);
18969                 MP_WritePhyUshort(sc, 0x14, 0x8480);
18970                 MP_WritePhyUshort(sc, 0x14, 0xc004);
18971                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18972                 MP_WritePhyUshort(sc, 0x14, 0x4000);
18973                 MP_WritePhyUshort(sc, 0x14, 0x6046);
18974                 MP_WritePhyUshort(sc, 0x14, 0x2d0d);
18975                 MP_WritePhyUshort(sc, 0x14, 0xa43f);
18976                 MP_WritePhyUshort(sc, 0x14, 0xa105);
18977                 MP_WritePhyUshort(sc, 0x14, 0x8228);
18978                 MP_WritePhyUshort(sc, 0x14, 0xc004);
18979                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18980                 MP_WritePhyUshort(sc, 0x14, 0x4000);
18981                 MP_WritePhyUshort(sc, 0x14, 0x81bc);
18982                 MP_WritePhyUshort(sc, 0x14, 0xa220);
18983                 MP_WritePhyUshort(sc, 0x14, 0x1d97);
18984                 MP_WritePhyUshort(sc, 0x14, 0x8220);
18985                 MP_WritePhyUshort(sc, 0x14, 0xa1bc);
18986                 MP_WritePhyUshort(sc, 0x14, 0xc040);
18987                 MP_WritePhyUshort(sc, 0x14, 0xd710);
18988                 MP_WritePhyUshort(sc, 0x14, 0x30e1);
18989                 MP_WritePhyUshort(sc, 0x14, 0x0abc);
18990                 MP_WritePhyUshort(sc, 0x14, 0x30e1);
18991                 MP_WritePhyUshort(sc, 0x14, 0x3d0d);
18992                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
18993                 MP_WritePhyUshort(sc, 0x14, 0x7f4c);
18994                 MP_WritePhyUshort(sc, 0x14, 0x2ab6);
18995                 MP_WritePhyUshort(sc, 0x14, 0xa802);
18996                 MP_WritePhyUshort(sc, 0x14, 0xd70c);
18997                 MP_WritePhyUshort(sc, 0x14, 0x4244);
18998                 MP_WritePhyUshort(sc, 0x14, 0xa301);
18999                 MP_WritePhyUshort(sc, 0x14, 0xc004);
19000                 MP_WritePhyUshort(sc, 0x14, 0xd711);
19001                 MP_WritePhyUshort(sc, 0x14, 0x3128);
19002                 MP_WritePhyUshort(sc, 0x14, 0x3da5);
19003                 MP_WritePhyUshort(sc, 0x14, 0xd710);
19004                 MP_WritePhyUshort(sc, 0x14, 0x5f80);
19005                 MP_WritePhyUshort(sc, 0x14, 0xd711);
19006                 MP_WritePhyUshort(sc, 0x14, 0x3109);
19007                 MP_WritePhyUshort(sc, 0x14, 0x3da7);
19008                 MP_WritePhyUshort(sc, 0x14, 0x2dab);
19009                 MP_WritePhyUshort(sc, 0x14, 0xa801);
19010                 MP_WritePhyUshort(sc, 0x14, 0x2d9a);
19011                 MP_WritePhyUshort(sc, 0x14, 0xa802);
19012                 MP_WritePhyUshort(sc, 0x14, 0xc004);
19013                 MP_WritePhyUshort(sc, 0x14, 0xd710);
19014                 MP_WritePhyUshort(sc, 0x14, 0x4000);
19015                 MP_WritePhyUshort(sc, 0x14, 0x0800);
19016                 MP_WritePhyUshort(sc, 0x14, 0xa510);
19017                 MP_WritePhyUshort(sc, 0x14, 0xd710);
19018                 MP_WritePhyUshort(sc, 0x14, 0x609a);
19019                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
19020                 MP_WritePhyUshort(sc, 0x14, 0x7fac);
19021                 MP_WritePhyUshort(sc, 0x14, 0x2ab6);
19022                 MP_WritePhyUshort(sc, 0x14, 0x8510);
19023                 MP_WritePhyUshort(sc, 0x14, 0x0800);
19024                 MP_WritePhyUshort(sc, 0x13, 0xA01A);
19025                 MP_WritePhyUshort(sc, 0x14, 0x0000);
19026                 MP_WritePhyUshort(sc, 0x13, 0xA006);
19027                 MP_WritePhyUshort(sc, 0x14, 0x0ad6);
19028                 MP_WritePhyUshort(sc, 0x13, 0xA004);
19029                 MP_WritePhyUshort(sc, 0x14, 0x07f5);
19030                 MP_WritePhyUshort(sc, 0x13, 0xA002);
19031                 MP_WritePhyUshort(sc, 0x14, 0x06a9);
19032                 MP_WritePhyUshort(sc, 0x13, 0xA000);
19033                 MP_WritePhyUshort(sc, 0x14, 0xf069);
19034                 MP_WritePhyUshort(sc, 0x13, 0xB820);
19035                 MP_WritePhyUshort(sc, 0x14, 0x0210);
19036
19037                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19038                 MP_WritePhyUshort(sc, 0x13, 0x83a0);
19039                 MP_WritePhyUshort(sc, 0x14, 0xaf83);
19040                 MP_WritePhyUshort(sc, 0x14, 0xacaf);
19041                 MP_WritePhyUshort(sc, 0x14, 0x83b8);
19042                 MP_WritePhyUshort(sc, 0x14, 0xaf83);
19043                 MP_WritePhyUshort(sc, 0x14, 0xcdaf);
19044                 MP_WritePhyUshort(sc, 0x14, 0x83d3);
19045                 MP_WritePhyUshort(sc, 0x14, 0x0204);
19046                 MP_WritePhyUshort(sc, 0x14, 0x9a02);
19047                 MP_WritePhyUshort(sc, 0x14, 0x09a9);
19048                 MP_WritePhyUshort(sc, 0x14, 0x0284);
19049                 MP_WritePhyUshort(sc, 0x14, 0x61af);
19050                 MP_WritePhyUshort(sc, 0x14, 0x02fc);
19051                 MP_WritePhyUshort(sc, 0x14, 0xad20);
19052                 MP_WritePhyUshort(sc, 0x14, 0x0302);
19053                 MP_WritePhyUshort(sc, 0x14, 0x867c);
19054                 MP_WritePhyUshort(sc, 0x14, 0xad21);
19055                 MP_WritePhyUshort(sc, 0x14, 0x0302);
19056                 MP_WritePhyUshort(sc, 0x14, 0x85c9);
19057                 MP_WritePhyUshort(sc, 0x14, 0xad22);
19058                 MP_WritePhyUshort(sc, 0x14, 0x0302);
19059                 MP_WritePhyUshort(sc, 0x14, 0x1bc0);
19060                 MP_WritePhyUshort(sc, 0x14, 0xaf17);
19061                 MP_WritePhyUshort(sc, 0x14, 0xe302);
19062                 MP_WritePhyUshort(sc, 0x14, 0x8703);
19063                 MP_WritePhyUshort(sc, 0x14, 0xaf18);
19064                 MP_WritePhyUshort(sc, 0x14, 0x6201);
19065                 MP_WritePhyUshort(sc, 0x14, 0x06e0);
19066                 MP_WritePhyUshort(sc, 0x14, 0x8148);
19067                 MP_WritePhyUshort(sc, 0x14, 0xaf3c);
19068                 MP_WritePhyUshort(sc, 0x14, 0x69f8);
19069                 MP_WritePhyUshort(sc, 0x14, 0xf9fa);
19070                 MP_WritePhyUshort(sc, 0x14, 0xef69);
19071                 MP_WritePhyUshort(sc, 0x14, 0xee80);
19072                 MP_WritePhyUshort(sc, 0x14, 0x10f7);
19073                 MP_WritePhyUshort(sc, 0x14, 0xee80);
19074                 MP_WritePhyUshort(sc, 0x14, 0x131f);
19075                 MP_WritePhyUshort(sc, 0x14, 0xd104);
19076                 MP_WritePhyUshort(sc, 0x14, 0xbf87);
19077                 MP_WritePhyUshort(sc, 0x14, 0xf302);
19078                 MP_WritePhyUshort(sc, 0x14, 0x4259);
19079                 MP_WritePhyUshort(sc, 0x14, 0x0287);
19080                 MP_WritePhyUshort(sc, 0x14, 0x88bf);
19081                 MP_WritePhyUshort(sc, 0x14, 0x87cf);
19082                 MP_WritePhyUshort(sc, 0x14, 0xd7b8);
19083                 MP_WritePhyUshort(sc, 0x14, 0x22d0);
19084                 MP_WritePhyUshort(sc, 0x14, 0x0c02);
19085                 MP_WritePhyUshort(sc, 0x14, 0x4252);
19086                 MP_WritePhyUshort(sc, 0x14, 0xee80);
19087                 MP_WritePhyUshort(sc, 0x14, 0xcda0);
19088                 MP_WritePhyUshort(sc, 0x14, 0xee80);
19089                 MP_WritePhyUshort(sc, 0x14, 0xce8b);
19090                 MP_WritePhyUshort(sc, 0x14, 0xee80);
19091                 MP_WritePhyUshort(sc, 0x14, 0xd1f5);
19092                 MP_WritePhyUshort(sc, 0x14, 0xee80);
19093                 MP_WritePhyUshort(sc, 0x14, 0xd2a9);
19094                 MP_WritePhyUshort(sc, 0x14, 0xee80);
19095                 MP_WritePhyUshort(sc, 0x14, 0xd30a);
19096                 MP_WritePhyUshort(sc, 0x14, 0xee80);
19097                 MP_WritePhyUshort(sc, 0x14, 0xf010);
19098                 MP_WritePhyUshort(sc, 0x14, 0xee80);
19099                 MP_WritePhyUshort(sc, 0x14, 0xf38f);
19100                 MP_WritePhyUshort(sc, 0x14, 0xee81);
19101                 MP_WritePhyUshort(sc, 0x14, 0x011e);
19102                 MP_WritePhyUshort(sc, 0x14, 0xee81);
19103                 MP_WritePhyUshort(sc, 0x14, 0x0b4a);
19104                 MP_WritePhyUshort(sc, 0x14, 0xee81);
19105                 MP_WritePhyUshort(sc, 0x14, 0x0c7c);
19106                 MP_WritePhyUshort(sc, 0x14, 0xee81);
19107                 MP_WritePhyUshort(sc, 0x14, 0x127f);
19108                 MP_WritePhyUshort(sc, 0x14, 0xd100);
19109                 MP_WritePhyUshort(sc, 0x14, 0x0210);
19110                 MP_WritePhyUshort(sc, 0x14, 0xb5ee);
19111                 MP_WritePhyUshort(sc, 0x14, 0x8088);
19112                 MP_WritePhyUshort(sc, 0x14, 0xa4ee);
19113                 MP_WritePhyUshort(sc, 0x14, 0x8089);
19114                 MP_WritePhyUshort(sc, 0x14, 0x44ee);
19115                 MP_WritePhyUshort(sc, 0x14, 0x809a);
19116                 MP_WritePhyUshort(sc, 0x14, 0xa4ee);
19117                 MP_WritePhyUshort(sc, 0x14, 0x809b);
19118                 MP_WritePhyUshort(sc, 0x14, 0x44ee);
19119                 MP_WritePhyUshort(sc, 0x14, 0x809c);
19120                 MP_WritePhyUshort(sc, 0x14, 0xa7ee);
19121                 MP_WritePhyUshort(sc, 0x14, 0x80a5);
19122                 MP_WritePhyUshort(sc, 0x14, 0xa7d2);
19123                 MP_WritePhyUshort(sc, 0x14, 0x0002);
19124                 MP_WritePhyUshort(sc, 0x14, 0x0e66);
19125                 MP_WritePhyUshort(sc, 0x14, 0x0285);
19126                 MP_WritePhyUshort(sc, 0x14, 0xc0ee);
19127                 MP_WritePhyUshort(sc, 0x14, 0x87fc);
19128                 MP_WritePhyUshort(sc, 0x14, 0x00e0);
19129                 MP_WritePhyUshort(sc, 0x14, 0x8245);
19130                 MP_WritePhyUshort(sc, 0x14, 0xf622);
19131                 MP_WritePhyUshort(sc, 0x14, 0xe482);
19132                 MP_WritePhyUshort(sc, 0x14, 0x45ef);
19133                 MP_WritePhyUshort(sc, 0x14, 0x96fe);
19134                 MP_WritePhyUshort(sc, 0x14, 0xfdfc);
19135                 MP_WritePhyUshort(sc, 0x14, 0x0402);
19136                 MP_WritePhyUshort(sc, 0x14, 0x847a);
19137                 MP_WritePhyUshort(sc, 0x14, 0x0284);
19138                 MP_WritePhyUshort(sc, 0x14, 0xb302);
19139                 MP_WritePhyUshort(sc, 0x14, 0x0cab);
19140                 MP_WritePhyUshort(sc, 0x14, 0x020c);
19141                 MP_WritePhyUshort(sc, 0x14, 0xc402);
19142                 MP_WritePhyUshort(sc, 0x14, 0x0cef);
19143                 MP_WritePhyUshort(sc, 0x14, 0x020d);
19144                 MP_WritePhyUshort(sc, 0x14, 0x0802);
19145                 MP_WritePhyUshort(sc, 0x14, 0x0d33);
19146                 MP_WritePhyUshort(sc, 0x14, 0x020c);
19147                 MP_WritePhyUshort(sc, 0x14, 0x3d04);
19148                 MP_WritePhyUshort(sc, 0x14, 0xf8fa);
19149                 MP_WritePhyUshort(sc, 0x14, 0xef69);
19150                 MP_WritePhyUshort(sc, 0x14, 0xe182);
19151                 MP_WritePhyUshort(sc, 0x14, 0x2fac);
19152                 MP_WritePhyUshort(sc, 0x14, 0x291a);
19153                 MP_WritePhyUshort(sc, 0x14, 0xe082);
19154                 MP_WritePhyUshort(sc, 0x14, 0x24ac);
19155                 MP_WritePhyUshort(sc, 0x14, 0x2102);
19156                 MP_WritePhyUshort(sc, 0x14, 0xae22);
19157                 MP_WritePhyUshort(sc, 0x14, 0x0210);
19158                 MP_WritePhyUshort(sc, 0x14, 0x57f6);
19159                 MP_WritePhyUshort(sc, 0x14, 0x21e4);
19160                 MP_WritePhyUshort(sc, 0x14, 0x8224);
19161                 MP_WritePhyUshort(sc, 0x14, 0xd101);
19162                 MP_WritePhyUshort(sc, 0x14, 0xbf44);
19163                 MP_WritePhyUshort(sc, 0x14, 0xd202);
19164                 MP_WritePhyUshort(sc, 0x14, 0x4259);
19165                 MP_WritePhyUshort(sc, 0x14, 0xae10);
19166                 MP_WritePhyUshort(sc, 0x14, 0x0212);
19167                 MP_WritePhyUshort(sc, 0x14, 0x4cf6);
19168                 MP_WritePhyUshort(sc, 0x14, 0x29e5);
19169                 MP_WritePhyUshort(sc, 0x14, 0x822f);
19170                 MP_WritePhyUshort(sc, 0x14, 0xe082);
19171                 MP_WritePhyUshort(sc, 0x14, 0x24f6);
19172                 MP_WritePhyUshort(sc, 0x14, 0x21e4);
19173                 MP_WritePhyUshort(sc, 0x14, 0x8224);
19174                 MP_WritePhyUshort(sc, 0x14, 0xef96);
19175                 MP_WritePhyUshort(sc, 0x14, 0xfefc);
19176                 MP_WritePhyUshort(sc, 0x14, 0x04f8);
19177                 MP_WritePhyUshort(sc, 0x14, 0xe182);
19178                 MP_WritePhyUshort(sc, 0x14, 0x2fac);
19179                 MP_WritePhyUshort(sc, 0x14, 0x2a18);
19180                 MP_WritePhyUshort(sc, 0x14, 0xe082);
19181                 MP_WritePhyUshort(sc, 0x14, 0x24ac);
19182                 MP_WritePhyUshort(sc, 0x14, 0x2202);
19183                 MP_WritePhyUshort(sc, 0x14, 0xae26);
19184                 MP_WritePhyUshort(sc, 0x14, 0x0284);
19185                 MP_WritePhyUshort(sc, 0x14, 0xf802);
19186                 MP_WritePhyUshort(sc, 0x14, 0x8565);
19187                 MP_WritePhyUshort(sc, 0x14, 0xd101);
19188                 MP_WritePhyUshort(sc, 0x14, 0xbf44);
19189                 MP_WritePhyUshort(sc, 0x14, 0xd502);
19190                 MP_WritePhyUshort(sc, 0x14, 0x4259);
19191                 MP_WritePhyUshort(sc, 0x14, 0xae0e);
19192                 MP_WritePhyUshort(sc, 0x14, 0x0284);
19193                 MP_WritePhyUshort(sc, 0x14, 0xea02);
19194                 MP_WritePhyUshort(sc, 0x14, 0x85a9);
19195                 MP_WritePhyUshort(sc, 0x14, 0xe182);
19196                 MP_WritePhyUshort(sc, 0x14, 0x2ff6);
19197                 MP_WritePhyUshort(sc, 0x14, 0x2ae5);
19198                 MP_WritePhyUshort(sc, 0x14, 0x822f);
19199                 MP_WritePhyUshort(sc, 0x14, 0xe082);
19200                 MP_WritePhyUshort(sc, 0x14, 0x24f6);
19201                 MP_WritePhyUshort(sc, 0x14, 0x22e4);
19202                 MP_WritePhyUshort(sc, 0x14, 0x8224);
19203                 MP_WritePhyUshort(sc, 0x14, 0xfc04);
19204                 MP_WritePhyUshort(sc, 0x14, 0xf9e2);
19205                 MP_WritePhyUshort(sc, 0x14, 0x8011);
19206                 MP_WritePhyUshort(sc, 0x14, 0xad31);
19207                 MP_WritePhyUshort(sc, 0x14, 0x05d2);
19208                 MP_WritePhyUshort(sc, 0x14, 0x0002);
19209                 MP_WritePhyUshort(sc, 0x14, 0x0e66);
19210                 MP_WritePhyUshort(sc, 0x14, 0xfd04);
19211                 MP_WritePhyUshort(sc, 0x14, 0xf8f9);
19212                 MP_WritePhyUshort(sc, 0x14, 0xfaef);
19213                 MP_WritePhyUshort(sc, 0x14, 0x69e0);
19214                 MP_WritePhyUshort(sc, 0x14, 0x8011);
19215                 MP_WritePhyUshort(sc, 0x14, 0xad21);
19216                 MP_WritePhyUshort(sc, 0x14, 0x5cbf);
19217                 MP_WritePhyUshort(sc, 0x14, 0x43be);
19218                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19219                 MP_WritePhyUshort(sc, 0x14, 0x97ac);
19220                 MP_WritePhyUshort(sc, 0x14, 0x281b);
19221                 MP_WritePhyUshort(sc, 0x14, 0xbf43);
19222                 MP_WritePhyUshort(sc, 0x14, 0xc102);
19223                 MP_WritePhyUshort(sc, 0x14, 0x4297);
19224                 MP_WritePhyUshort(sc, 0x14, 0xac28);
19225                 MP_WritePhyUshort(sc, 0x14, 0x12bf);
19226                 MP_WritePhyUshort(sc, 0x14, 0x43c7);
19227                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19228                 MP_WritePhyUshort(sc, 0x14, 0x97ac);
19229                 MP_WritePhyUshort(sc, 0x14, 0x2804);
19230                 MP_WritePhyUshort(sc, 0x14, 0xd300);
19231                 MP_WritePhyUshort(sc, 0x14, 0xae07);
19232                 MP_WritePhyUshort(sc, 0x14, 0xd306);
19233                 MP_WritePhyUshort(sc, 0x14, 0xaf85);
19234                 MP_WritePhyUshort(sc, 0x14, 0x56d3);
19235                 MP_WritePhyUshort(sc, 0x14, 0x03e0);
19236                 MP_WritePhyUshort(sc, 0x14, 0x8011);
19237                 MP_WritePhyUshort(sc, 0x14, 0xad26);
19238                 MP_WritePhyUshort(sc, 0x14, 0x25bf);
19239                 MP_WritePhyUshort(sc, 0x14, 0x4559);
19240                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19241                 MP_WritePhyUshort(sc, 0x14, 0x97e2);
19242                 MP_WritePhyUshort(sc, 0x14, 0x8073);
19243                 MP_WritePhyUshort(sc, 0x14, 0x0d21);
19244                 MP_WritePhyUshort(sc, 0x14, 0xf637);
19245                 MP_WritePhyUshort(sc, 0x14, 0x0d11);
19246                 MP_WritePhyUshort(sc, 0x14, 0xf62f);
19247                 MP_WritePhyUshort(sc, 0x14, 0x1b21);
19248                 MP_WritePhyUshort(sc, 0x14, 0xaa02);
19249                 MP_WritePhyUshort(sc, 0x14, 0xae10);
19250                 MP_WritePhyUshort(sc, 0x14, 0xe280);
19251                 MP_WritePhyUshort(sc, 0x14, 0x740d);
19252                 MP_WritePhyUshort(sc, 0x14, 0x21f6);
19253                 MP_WritePhyUshort(sc, 0x14, 0x371b);
19254                 MP_WritePhyUshort(sc, 0x14, 0x21aa);
19255                 MP_WritePhyUshort(sc, 0x14, 0x0313);
19256                 MP_WritePhyUshort(sc, 0x14, 0xae02);
19257                 MP_WritePhyUshort(sc, 0x14, 0x2b02);
19258                 MP_WritePhyUshort(sc, 0x14, 0x020e);
19259                 MP_WritePhyUshort(sc, 0x14, 0x5102);
19260                 MP_WritePhyUshort(sc, 0x14, 0x0e66);
19261                 MP_WritePhyUshort(sc, 0x14, 0x020f);
19262                 MP_WritePhyUshort(sc, 0x14, 0xa3ef);
19263                 MP_WritePhyUshort(sc, 0x14, 0x96fe);
19264                 MP_WritePhyUshort(sc, 0x14, 0xfdfc);
19265                 MP_WritePhyUshort(sc, 0x14, 0x04f8);
19266                 MP_WritePhyUshort(sc, 0x14, 0xf9fa);
19267                 MP_WritePhyUshort(sc, 0x14, 0xef69);
19268                 MP_WritePhyUshort(sc, 0x14, 0xe080);
19269                 MP_WritePhyUshort(sc, 0x14, 0x12ad);
19270                 MP_WritePhyUshort(sc, 0x14, 0x2733);
19271                 MP_WritePhyUshort(sc, 0x14, 0xbf43);
19272                 MP_WritePhyUshort(sc, 0x14, 0xbe02);
19273                 MP_WritePhyUshort(sc, 0x14, 0x4297);
19274                 MP_WritePhyUshort(sc, 0x14, 0xac28);
19275                 MP_WritePhyUshort(sc, 0x14, 0x09bf);
19276                 MP_WritePhyUshort(sc, 0x14, 0x43c1);
19277                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19278                 MP_WritePhyUshort(sc, 0x14, 0x97ad);
19279                 MP_WritePhyUshort(sc, 0x14, 0x2821);
19280                 MP_WritePhyUshort(sc, 0x14, 0xbf45);
19281                 MP_WritePhyUshort(sc, 0x14, 0x5902);
19282                 MP_WritePhyUshort(sc, 0x14, 0x4297);
19283                 MP_WritePhyUshort(sc, 0x14, 0xe387);
19284                 MP_WritePhyUshort(sc, 0x14, 0xffd2);
19285                 MP_WritePhyUshort(sc, 0x14, 0x001b);
19286                 MP_WritePhyUshort(sc, 0x14, 0x45ac);
19287                 MP_WritePhyUshort(sc, 0x14, 0x2711);
19288                 MP_WritePhyUshort(sc, 0x14, 0xe187);
19289                 MP_WritePhyUshort(sc, 0x14, 0xfebf);
19290                 MP_WritePhyUshort(sc, 0x14, 0x87e4);
19291                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19292                 MP_WritePhyUshort(sc, 0x14, 0x590d);
19293                 MP_WritePhyUshort(sc, 0x14, 0x11bf);
19294                 MP_WritePhyUshort(sc, 0x14, 0x87e7);
19295                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19296                 MP_WritePhyUshort(sc, 0x14, 0x59ef);
19297                 MP_WritePhyUshort(sc, 0x14, 0x96fe);
19298                 MP_WritePhyUshort(sc, 0x14, 0xfdfc);
19299                 MP_WritePhyUshort(sc, 0x14, 0x04f8);
19300                 MP_WritePhyUshort(sc, 0x14, 0xfaef);
19301                 MP_WritePhyUshort(sc, 0x14, 0x69d1);
19302                 MP_WritePhyUshort(sc, 0x14, 0x00bf);
19303                 MP_WritePhyUshort(sc, 0x14, 0x87e4);
19304                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19305                 MP_WritePhyUshort(sc, 0x14, 0x59bf);
19306                 MP_WritePhyUshort(sc, 0x14, 0x87e7);
19307                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19308                 MP_WritePhyUshort(sc, 0x14, 0x59ef);
19309                 MP_WritePhyUshort(sc, 0x14, 0x96fe);
19310                 MP_WritePhyUshort(sc, 0x14, 0xfc04);
19311                 MP_WritePhyUshort(sc, 0x14, 0xee87);
19312                 MP_WritePhyUshort(sc, 0x14, 0xff46);
19313                 MP_WritePhyUshort(sc, 0x14, 0xee87);
19314                 MP_WritePhyUshort(sc, 0x14, 0xfe01);
19315                 MP_WritePhyUshort(sc, 0x14, 0x04f8);
19316                 MP_WritePhyUshort(sc, 0x14, 0xfaef);
19317                 MP_WritePhyUshort(sc, 0x14, 0x69e0);
19318                 MP_WritePhyUshort(sc, 0x14, 0x8241);
19319                 MP_WritePhyUshort(sc, 0x14, 0xa000);
19320                 MP_WritePhyUshort(sc, 0x14, 0x0502);
19321                 MP_WritePhyUshort(sc, 0x14, 0x85eb);
19322                 MP_WritePhyUshort(sc, 0x14, 0xae0e);
19323                 MP_WritePhyUshort(sc, 0x14, 0xa001);
19324                 MP_WritePhyUshort(sc, 0x14, 0x0502);
19325                 MP_WritePhyUshort(sc, 0x14, 0x1a5a);
19326                 MP_WritePhyUshort(sc, 0x14, 0xae06);
19327                 MP_WritePhyUshort(sc, 0x14, 0xa002);
19328                 MP_WritePhyUshort(sc, 0x14, 0x0302);
19329                 MP_WritePhyUshort(sc, 0x14, 0x1ae6);
19330                 MP_WritePhyUshort(sc, 0x14, 0xef96);
19331                 MP_WritePhyUshort(sc, 0x14, 0xfefc);
19332                 MP_WritePhyUshort(sc, 0x14, 0x04f8);
19333                 MP_WritePhyUshort(sc, 0x14, 0xf9fa);
19334                 MP_WritePhyUshort(sc, 0x14, 0xef69);
19335                 MP_WritePhyUshort(sc, 0x14, 0xe082);
19336                 MP_WritePhyUshort(sc, 0x14, 0x29f6);
19337                 MP_WritePhyUshort(sc, 0x14, 0x21e4);
19338                 MP_WritePhyUshort(sc, 0x14, 0x8229);
19339                 MP_WritePhyUshort(sc, 0x14, 0xe080);
19340                 MP_WritePhyUshort(sc, 0x14, 0x10ac);
19341                 MP_WritePhyUshort(sc, 0x14, 0x2202);
19342                 MP_WritePhyUshort(sc, 0x14, 0xae76);
19343                 MP_WritePhyUshort(sc, 0x14, 0xe082);
19344                 MP_WritePhyUshort(sc, 0x14, 0x27f7);
19345                 MP_WritePhyUshort(sc, 0x14, 0x21e4);
19346                 MP_WritePhyUshort(sc, 0x14, 0x8227);
19347                 MP_WritePhyUshort(sc, 0x14, 0xbf43);
19348                 MP_WritePhyUshort(sc, 0x14, 0x1302);
19349                 MP_WritePhyUshort(sc, 0x14, 0x4297);
19350                 MP_WritePhyUshort(sc, 0x14, 0xef21);
19351                 MP_WritePhyUshort(sc, 0x14, 0xbf43);
19352                 MP_WritePhyUshort(sc, 0x14, 0x1602);
19353                 MP_WritePhyUshort(sc, 0x14, 0x4297);
19354                 MP_WritePhyUshort(sc, 0x14, 0x0c11);
19355                 MP_WritePhyUshort(sc, 0x14, 0x1e21);
19356                 MP_WritePhyUshort(sc, 0x14, 0xbf43);
19357                 MP_WritePhyUshort(sc, 0x14, 0x1902);
19358                 MP_WritePhyUshort(sc, 0x14, 0x4297);
19359                 MP_WritePhyUshort(sc, 0x14, 0x0c12);
19360                 MP_WritePhyUshort(sc, 0x14, 0x1e21);
19361                 MP_WritePhyUshort(sc, 0x14, 0xe682);
19362                 MP_WritePhyUshort(sc, 0x14, 0x43a2);
19363                 MP_WritePhyUshort(sc, 0x14, 0x000a);
19364                 MP_WritePhyUshort(sc, 0x14, 0xe182);
19365                 MP_WritePhyUshort(sc, 0x14, 0x27f6);
19366                 MP_WritePhyUshort(sc, 0x14, 0x29e5);
19367                 MP_WritePhyUshort(sc, 0x14, 0x8227);
19368                 MP_WritePhyUshort(sc, 0x14, 0xae42);
19369                 MP_WritePhyUshort(sc, 0x14, 0xe082);
19370                 MP_WritePhyUshort(sc, 0x14, 0x44f7);
19371                 MP_WritePhyUshort(sc, 0x14, 0x21e4);
19372                 MP_WritePhyUshort(sc, 0x14, 0x8244);
19373                 MP_WritePhyUshort(sc, 0x14, 0x0246);
19374                 MP_WritePhyUshort(sc, 0x14, 0xaebf);
19375                 MP_WritePhyUshort(sc, 0x14, 0x4325);
19376                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19377                 MP_WritePhyUshort(sc, 0x14, 0x97ef);
19378                 MP_WritePhyUshort(sc, 0x14, 0x21bf);
19379                 MP_WritePhyUshort(sc, 0x14, 0x431c);
19380                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19381                 MP_WritePhyUshort(sc, 0x14, 0x970c);
19382                 MP_WritePhyUshort(sc, 0x14, 0x121e);
19383                 MP_WritePhyUshort(sc, 0x14, 0x21bf);
19384                 MP_WritePhyUshort(sc, 0x14, 0x431f);
19385                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19386                 MP_WritePhyUshort(sc, 0x14, 0x970c);
19387                 MP_WritePhyUshort(sc, 0x14, 0x131e);
19388                 MP_WritePhyUshort(sc, 0x14, 0x21bf);
19389                 MP_WritePhyUshort(sc, 0x14, 0x4328);
19390                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19391                 MP_WritePhyUshort(sc, 0x14, 0x970c);
19392                 MP_WritePhyUshort(sc, 0x14, 0x141e);
19393                 MP_WritePhyUshort(sc, 0x14, 0x21bf);
19394                 MP_WritePhyUshort(sc, 0x14, 0x44b1);
19395                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19396                 MP_WritePhyUshort(sc, 0x14, 0x970c);
19397                 MP_WritePhyUshort(sc, 0x14, 0x161e);
19398                 MP_WritePhyUshort(sc, 0x14, 0x21e6);
19399                 MP_WritePhyUshort(sc, 0x14, 0x8242);
19400                 MP_WritePhyUshort(sc, 0x14, 0xee82);
19401                 MP_WritePhyUshort(sc, 0x14, 0x4101);
19402                 MP_WritePhyUshort(sc, 0x14, 0xef96);
19403                 MP_WritePhyUshort(sc, 0x14, 0xfefd);
19404                 MP_WritePhyUshort(sc, 0x14, 0xfc04);
19405                 MP_WritePhyUshort(sc, 0x14, 0xf8fa);
19406                 MP_WritePhyUshort(sc, 0x14, 0xef69);
19407                 MP_WritePhyUshort(sc, 0x14, 0xe082);
19408                 MP_WritePhyUshort(sc, 0x14, 0x46a0);
19409                 MP_WritePhyUshort(sc, 0x14, 0x0005);
19410                 MP_WritePhyUshort(sc, 0x14, 0x0286);
19411                 MP_WritePhyUshort(sc, 0x14, 0x96ae);
19412                 MP_WritePhyUshort(sc, 0x14, 0x06a0);
19413                 MP_WritePhyUshort(sc, 0x14, 0x0103);
19414                 MP_WritePhyUshort(sc, 0x14, 0x0219);
19415                 MP_WritePhyUshort(sc, 0x14, 0x19ef);
19416                 MP_WritePhyUshort(sc, 0x14, 0x96fe);
19417                 MP_WritePhyUshort(sc, 0x14, 0xfc04);
19418                 MP_WritePhyUshort(sc, 0x14, 0xf8fa);
19419                 MP_WritePhyUshort(sc, 0x14, 0xef69);
19420                 MP_WritePhyUshort(sc, 0x14, 0xe082);
19421                 MP_WritePhyUshort(sc, 0x14, 0x29f6);
19422                 MP_WritePhyUshort(sc, 0x14, 0x20e4);
19423                 MP_WritePhyUshort(sc, 0x14, 0x8229);
19424                 MP_WritePhyUshort(sc, 0x14, 0xe080);
19425                 MP_WritePhyUshort(sc, 0x14, 0x10ac);
19426                 MP_WritePhyUshort(sc, 0x14, 0x2102);
19427                 MP_WritePhyUshort(sc, 0x14, 0xae54);
19428                 MP_WritePhyUshort(sc, 0x14, 0xe082);
19429                 MP_WritePhyUshort(sc, 0x14, 0x27f7);
19430                 MP_WritePhyUshort(sc, 0x14, 0x20e4);
19431                 MP_WritePhyUshort(sc, 0x14, 0x8227);
19432                 MP_WritePhyUshort(sc, 0x14, 0xbf42);
19433                 MP_WritePhyUshort(sc, 0x14, 0xe602);
19434                 MP_WritePhyUshort(sc, 0x14, 0x4297);
19435                 MP_WritePhyUshort(sc, 0x14, 0xac28);
19436                 MP_WritePhyUshort(sc, 0x14, 0x22bf);
19437                 MP_WritePhyUshort(sc, 0x14, 0x430d);
19438                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19439                 MP_WritePhyUshort(sc, 0x14, 0x97e5);
19440                 MP_WritePhyUshort(sc, 0x14, 0x8247);
19441                 MP_WritePhyUshort(sc, 0x14, 0xac28);
19442                 MP_WritePhyUshort(sc, 0x14, 0x20d1);
19443                 MP_WritePhyUshort(sc, 0x14, 0x03bf);
19444                 MP_WritePhyUshort(sc, 0x14, 0x4307);
19445                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19446                 MP_WritePhyUshort(sc, 0x14, 0x59ee);
19447                 MP_WritePhyUshort(sc, 0x14, 0x8246);
19448                 MP_WritePhyUshort(sc, 0x14, 0x00e1);
19449                 MP_WritePhyUshort(sc, 0x14, 0x8227);
19450                 MP_WritePhyUshort(sc, 0x14, 0xf628);
19451                 MP_WritePhyUshort(sc, 0x14, 0xe582);
19452                 MP_WritePhyUshort(sc, 0x14, 0x27ae);
19453                 MP_WritePhyUshort(sc, 0x14, 0x21d1);
19454                 MP_WritePhyUshort(sc, 0x14, 0x04bf);
19455                 MP_WritePhyUshort(sc, 0x14, 0x4307);
19456                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19457                 MP_WritePhyUshort(sc, 0x14, 0x59ae);
19458                 MP_WritePhyUshort(sc, 0x14, 0x08d1);
19459                 MP_WritePhyUshort(sc, 0x14, 0x05bf);
19460                 MP_WritePhyUshort(sc, 0x14, 0x4307);
19461                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19462                 MP_WritePhyUshort(sc, 0x14, 0x59e0);
19463                 MP_WritePhyUshort(sc, 0x14, 0x8244);
19464                 MP_WritePhyUshort(sc, 0x14, 0xf720);
19465                 MP_WritePhyUshort(sc, 0x14, 0xe482);
19466                 MP_WritePhyUshort(sc, 0x14, 0x4402);
19467                 MP_WritePhyUshort(sc, 0x14, 0x46ae);
19468                 MP_WritePhyUshort(sc, 0x14, 0xee82);
19469                 MP_WritePhyUshort(sc, 0x14, 0x4601);
19470                 MP_WritePhyUshort(sc, 0x14, 0xef96);
19471                 MP_WritePhyUshort(sc, 0x14, 0xfefc);
19472                 MP_WritePhyUshort(sc, 0x14, 0x04f8);
19473                 MP_WritePhyUshort(sc, 0x14, 0xfaef);
19474                 MP_WritePhyUshort(sc, 0x14, 0x69e0);
19475                 MP_WritePhyUshort(sc, 0x14, 0x8013);
19476                 MP_WritePhyUshort(sc, 0x14, 0xad24);
19477                 MP_WritePhyUshort(sc, 0x14, 0x1cbf);
19478                 MP_WritePhyUshort(sc, 0x14, 0x87f0);
19479                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19480                 MP_WritePhyUshort(sc, 0x14, 0x97ad);
19481                 MP_WritePhyUshort(sc, 0x14, 0x2813);
19482                 MP_WritePhyUshort(sc, 0x14, 0xe087);
19483                 MP_WritePhyUshort(sc, 0x14, 0xfca0);
19484                 MP_WritePhyUshort(sc, 0x14, 0x0005);
19485                 MP_WritePhyUshort(sc, 0x14, 0x0287);
19486                 MP_WritePhyUshort(sc, 0x14, 0x36ae);
19487                 MP_WritePhyUshort(sc, 0x14, 0x10a0);
19488                 MP_WritePhyUshort(sc, 0x14, 0x0105);
19489                 MP_WritePhyUshort(sc, 0x14, 0x0287);
19490                 MP_WritePhyUshort(sc, 0x14, 0x48ae);
19491                 MP_WritePhyUshort(sc, 0x14, 0x08e0);
19492                 MP_WritePhyUshort(sc, 0x14, 0x8230);
19493                 MP_WritePhyUshort(sc, 0x14, 0xf626);
19494                 MP_WritePhyUshort(sc, 0x14, 0xe482);
19495                 MP_WritePhyUshort(sc, 0x14, 0x30ef);
19496                 MP_WritePhyUshort(sc, 0x14, 0x96fe);
19497                 MP_WritePhyUshort(sc, 0x14, 0xfc04);
19498                 MP_WritePhyUshort(sc, 0x14, 0xf8e0);
19499                 MP_WritePhyUshort(sc, 0x14, 0x8245);
19500                 MP_WritePhyUshort(sc, 0x14, 0xf722);
19501                 MP_WritePhyUshort(sc, 0x14, 0xe482);
19502                 MP_WritePhyUshort(sc, 0x14, 0x4502);
19503                 MP_WritePhyUshort(sc, 0x14, 0x46ae);
19504                 MP_WritePhyUshort(sc, 0x14, 0xee87);
19505                 MP_WritePhyUshort(sc, 0x14, 0xfc01);
19506                 MP_WritePhyUshort(sc, 0x14, 0xfc04);
19507                 MP_WritePhyUshort(sc, 0x14, 0xf8fa);
19508                 MP_WritePhyUshort(sc, 0x14, 0xef69);
19509                 MP_WritePhyUshort(sc, 0x14, 0xfb02);
19510                 MP_WritePhyUshort(sc, 0x14, 0x46d3);
19511                 MP_WritePhyUshort(sc, 0x14, 0xad50);
19512                 MP_WritePhyUshort(sc, 0x14, 0x2fbf);
19513                 MP_WritePhyUshort(sc, 0x14, 0x87ed);
19514                 MP_WritePhyUshort(sc, 0x14, 0xd101);
19515                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19516                 MP_WritePhyUshort(sc, 0x14, 0x59bf);
19517                 MP_WritePhyUshort(sc, 0x14, 0x87ed);
19518                 MP_WritePhyUshort(sc, 0x14, 0xd100);
19519                 MP_WritePhyUshort(sc, 0x14, 0x0242);
19520                 MP_WritePhyUshort(sc, 0x14, 0x59e0);
19521                 MP_WritePhyUshort(sc, 0x14, 0x8245);
19522                 MP_WritePhyUshort(sc, 0x14, 0xf622);
19523                 MP_WritePhyUshort(sc, 0x14, 0xe482);
19524                 MP_WritePhyUshort(sc, 0x14, 0x4502);
19525                 MP_WritePhyUshort(sc, 0x14, 0x46ae);
19526                 MP_WritePhyUshort(sc, 0x14, 0xd100);
19527                 MP_WritePhyUshort(sc, 0x14, 0xbf87);
19528                 MP_WritePhyUshort(sc, 0x14, 0xf002);
19529                 MP_WritePhyUshort(sc, 0x14, 0x4259);
19530                 MP_WritePhyUshort(sc, 0x14, 0xee87);
19531                 MP_WritePhyUshort(sc, 0x14, 0xfc00);
19532                 MP_WritePhyUshort(sc, 0x14, 0xe082);
19533                 MP_WritePhyUshort(sc, 0x14, 0x30f6);
19534                 MP_WritePhyUshort(sc, 0x14, 0x26e4);
19535                 MP_WritePhyUshort(sc, 0x14, 0x8230);
19536                 MP_WritePhyUshort(sc, 0x14, 0xffef);
19537                 MP_WritePhyUshort(sc, 0x14, 0x96fe);
19538                 MP_WritePhyUshort(sc, 0x14, 0xfc04);
19539                 MP_WritePhyUshort(sc, 0x14, 0xf8f9);
19540                 MP_WritePhyUshort(sc, 0x14, 0xface);
19541                 MP_WritePhyUshort(sc, 0x14, 0xfaef);
19542                 MP_WritePhyUshort(sc, 0x14, 0x69fb);
19543                 MP_WritePhyUshort(sc, 0x14, 0xbf87);
19544                 MP_WritePhyUshort(sc, 0x14, 0xb3d7);
19545                 MP_WritePhyUshort(sc, 0x14, 0x001c);
19546                 MP_WritePhyUshort(sc, 0x14, 0xd819);
19547                 MP_WritePhyUshort(sc, 0x14, 0xd919);
19548                 MP_WritePhyUshort(sc, 0x14, 0xda19);
19549                 MP_WritePhyUshort(sc, 0x14, 0xdb19);
19550                 MP_WritePhyUshort(sc, 0x14, 0x07ef);
19551                 MP_WritePhyUshort(sc, 0x14, 0x9502);
19552                 MP_WritePhyUshort(sc, 0x14, 0x4259);
19553                 MP_WritePhyUshort(sc, 0x14, 0x073f);
19554                 MP_WritePhyUshort(sc, 0x14, 0x0004);
19555                 MP_WritePhyUshort(sc, 0x14, 0x9fec);
19556                 MP_WritePhyUshort(sc, 0x14, 0xffef);
19557                 MP_WritePhyUshort(sc, 0x14, 0x96fe);
19558                 MP_WritePhyUshort(sc, 0x14, 0xc6fe);
19559                 MP_WritePhyUshort(sc, 0x14, 0xfdfc);
19560                 MP_WritePhyUshort(sc, 0x14, 0x0400);
19561                 MP_WritePhyUshort(sc, 0x14, 0x0145);
19562                 MP_WritePhyUshort(sc, 0x14, 0x7d00);
19563                 MP_WritePhyUshort(sc, 0x14, 0x0345);
19564                 MP_WritePhyUshort(sc, 0x14, 0x5c00);
19565                 MP_WritePhyUshort(sc, 0x14, 0x0143);
19566                 MP_WritePhyUshort(sc, 0x14, 0x4f00);
19567                 MP_WritePhyUshort(sc, 0x14, 0x0387);
19568                 MP_WritePhyUshort(sc, 0x14, 0xdb00);
19569                 MP_WritePhyUshort(sc, 0x14, 0x0987);
19570                 MP_WritePhyUshort(sc, 0x14, 0xde00);
19571                 MP_WritePhyUshort(sc, 0x14, 0x0987);
19572                 MP_WritePhyUshort(sc, 0x14, 0xe100);
19573                 MP_WritePhyUshort(sc, 0x14, 0x0087);
19574                 MP_WritePhyUshort(sc, 0x14, 0xeaa4);
19575                 MP_WritePhyUshort(sc, 0x14, 0x00b8);
19576                 MP_WritePhyUshort(sc, 0x14, 0x20c4);
19577                 MP_WritePhyUshort(sc, 0x14, 0x1600);
19578                 MP_WritePhyUshort(sc, 0x14, 0x000f);
19579                 MP_WritePhyUshort(sc, 0x14, 0xf800);
19580                 MP_WritePhyUshort(sc, 0x14, 0x7098);
19581                 MP_WritePhyUshort(sc, 0x14, 0xa58a);
19582                 MP_WritePhyUshort(sc, 0x14, 0xb6a8);
19583                 MP_WritePhyUshort(sc, 0x14, 0x3e50);
19584                 MP_WritePhyUshort(sc, 0x14, 0xa83e);
19585                 MP_WritePhyUshort(sc, 0x14, 0x33bc);
19586                 MP_WritePhyUshort(sc, 0x14, 0xc622);
19587                 MP_WritePhyUshort(sc, 0x14, 0xbcc6);
19588                 MP_WritePhyUshort(sc, 0x14, 0xaaa4);
19589                 MP_WritePhyUshort(sc, 0x14, 0x42ff);
19590                 MP_WritePhyUshort(sc, 0x14, 0xc408);
19591                 MP_WritePhyUshort(sc, 0x14, 0x00c4);
19592                 MP_WritePhyUshort(sc, 0x14, 0x16a8);
19593                 MP_WritePhyUshort(sc, 0x14, 0xbcc0);
19594                 MP_WritePhyUshort(sc, 0x13, 0xb818);
19595                 MP_WritePhyUshort(sc, 0x14, 0x02f3);
19596                 MP_WritePhyUshort(sc, 0x13, 0xb81a);
19597                 MP_WritePhyUshort(sc, 0x14, 0x17d1);
19598                 MP_WritePhyUshort(sc, 0x13, 0xb81c);
19599                 MP_WritePhyUshort(sc, 0x14, 0x185a);
19600                 MP_WritePhyUshort(sc, 0x13, 0xb81e);
19601                 MP_WritePhyUshort(sc, 0x14, 0x3c66);
19602                 MP_WritePhyUshort(sc, 0x13, 0xb820);
19603                 MP_WritePhyUshort(sc, 0x14, 0x021f);
19604                 MP_WritePhyUshort(sc, 0x13, 0xc416);
19605                 MP_WritePhyUshort(sc, 0x14, 0x0500);
19606                 MP_WritePhyUshort(sc, 0x13, 0xb82e);
19607                 MP_WritePhyUshort(sc, 0x14, 0xfffc);
19608
19609                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19610                 MP_WritePhyUshort(sc, 0x13, 0x0000);
19611                 MP_WritePhyUshort(sc, 0x14, 0x0000);
19612                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19613                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19614                 PhyRegValue &= ~(BIT_9);
19615                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19616                 MP_WritePhyUshort(sc, 0x1f, 0x0A43);
19617                 MP_WritePhyUshort(sc, 0x13, 0x8146);
19618                 MP_WritePhyUshort(sc, 0x14, 0x0000);
19619
19620                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19621                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19622                 PhyRegValue &= ~(BIT_4);
19623                 MP_WritePhyUshort(sc, 0x10, PhyRegValue); // release patch request
19624
19625
19626                 MP_WritePhyUshort(sc, 0x1F, 0x0A46);
19627                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19628                 TmpUshort = (PhyRegValue & BIT_8) ? 0 : BIT_15;
19629
19630                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
19631                 ClearEthPhyBit(sc, 0x12, BIT_15);
19632                 SetEthPhyBit(sc, 0x12, TmpUshort);
19633
19634
19635                 MP_WritePhyUshort(sc, 0x1F, 0x0A46);
19636                 PhyRegValue = MP_ReadPhyUshort(sc, 0x13);
19637                 TmpUshort = (PhyRegValue & BIT_8) ? BIT_1 : 0;
19638
19639                 MP_WritePhyUshort(sc, 0x1F, 0x0C41);
19640                 ClearEthPhyBit(sc, 0x15, BIT_1);
19641                 SetEthPhyBit(sc, 0x15, TmpUshort);
19642
19643                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
19644                 SetEthPhyBit(sc, 0x11, (BIT_3 | BIT_2));
19645                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
19646
19647
19648                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
19649                 ClearEthPhyBit(sc, 0x14, BIT_8);
19650                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
19651                 SetEthPhyBit(sc, 0x11, BIT_7);
19652                 SetEthPhyBit(sc, 0x11, BIT_6);
19653                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19654                 MP_WritePhyUshort(sc, 0x13, 0x8084);
19655                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
19656                 SetEthPhyBit(sc, 0x10, BIT_12);
19657                 SetEthPhyBit(sc, 0x10, BIT_1);
19658                 SetEthPhyBit(sc, 0x10, BIT_0);
19659                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
19660
19661
19662                 MP_WritePhyUshort(sc, 0x1F, 0x0A4B);
19663                 SetEthPhyBit(sc, 0x11, BIT_2);
19664                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
19665
19666
19667
19668                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19669                 MP_WritePhyUshort(sc, 0x13, 0x8012);
19670                 SetEthPhyBit(sc, 0x14, BIT_15);
19671                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
19672
19673
19674
19675                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
19676                 ClearAndSetEthPhyBit(sc,
19677                                      0x11,
19678                                      BIT_13 ,
19679                                      BIT_14
19680                                     );
19681                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
19682
19683                 if (phy_power_saving == 1) {
19684                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19685                         SetEthPhyBit(sc, 0x10, BIT_2);
19686                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
19687                 } else {
19688                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19689                         ClearEthPhyBit(sc, 0x10, BIT_2);
19690                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
19691                         DELAY(20000);
19692                 }
19693
19694                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19695                 MP_WritePhyUshort(sc, 0x13, 0x809A);
19696                 MP_WritePhyUshort(sc, 0x14, 0x8022);
19697                 MP_WritePhyUshort(sc, 0x13, 0x80A0);
19698                 ClearAndSetEthPhyBit(sc,
19699                                      0x14,
19700                                      0xFF00,
19701                                      0x1000
19702                                     );
19703                 MP_WritePhyUshort(sc, 0x13, 0x8088);
19704                 MP_WritePhyUshort(sc, 0x14, 0x9222);
19705                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
19706
19707                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19708                 MP_WritePhyUshort(sc, 0x13, 0x8011);
19709                 ClearEthPhyBit(sc, 0x14, BIT_14);
19710                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
19711                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
19712                 MP_WritePhyUshort(sc, 0x00, 0x9200);
19713         } else if (sc->re_type == MACFG_58) {
19714                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
19715                 ClearEthPhyBit(sc, 0x14, BIT_8);
19716                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
19717                 SetEthPhyBit(sc, 0x11, BIT_7);
19718                 SetEthPhyBit(sc, 0x11, BIT_6);
19719                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19720                 MP_WritePhyUshort(sc, 0x13, 0x8084);
19721                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
19722                 SetEthPhyBit(sc, 0x10, BIT_12);
19723                 SetEthPhyBit(sc, 0x10, BIT_1);
19724                 SetEthPhyBit(sc, 0x10, BIT_0);
19725                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
19726
19727                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19728                 MP_WritePhyUshort(sc, 0x13, 0x8012);
19729                 SetEthPhyBit(sc, 0x14, BIT_15);
19730                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
19731
19732                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
19733                 ClearAndSetEthPhyBit(sc,
19734                                      0x11,
19735                                      BIT_13 ,
19736                                      BIT_14
19737                                     );
19738                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
19739
19740                 if (phy_power_saving == 1) {
19741                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19742                         SetEthPhyBit(sc, 0x10, BIT_2);
19743                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
19744                 } else {
19745                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19746                         ClearEthPhyBit(sc, 0x10, BIT_2);
19747                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
19748                         DELAY(20000);
19749                 }
19750
19751                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19752                 MP_WritePhyUshort(sc, 0x13, 0x8011);
19753                 ClearEthPhyBit(sc, 0x14, BIT_14);
19754                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
19755                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
19756                 MP_WritePhyUshort(sc, 0x00, 0x9200);
19757         } else if (sc->re_type == MACFG_59) {
19758                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19759                 PhyRegValue = MP_ReadPhyUshort(sc,  0x10);
19760                 PhyRegValue |= BIT_4;
19761                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19762
19763                 MP_WritePhyUshort(sc, 0x1f, 0x0B80);
19764                 WaitCnt = 0;
19765                 do {
19766                         PhyRegValue = MP_ReadPhyUshort(sc,  0x10);
19767                         PhyRegValue &= 0x0040;
19768                         DELAY(50);
19769                         DELAY(50);
19770                         WaitCnt++;
19771                 } while(PhyRegValue != 0x0040 && WaitCnt <1000);
19772
19773                 MP_WritePhyUshort(sc, 0x1f, 0x0A43);
19774                 MP_WritePhyUshort(sc, 0x13, 0x8146);
19775                 MP_WritePhyUshort(sc, 0x14, 0x0300);
19776                 MP_WritePhyUshort(sc, 0x13, 0xB82E);
19777                 MP_WritePhyUshort(sc, 0x14, 0x0001);
19778
19779                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19780                 MP_WritePhyUshort(sc, 0x13, 0xb820);
19781                 MP_WritePhyUshort(sc, 0x14, 0x0290);
19782                 MP_WritePhyUshort(sc, 0x13, 0xa012);
19783                 MP_WritePhyUshort(sc, 0x14, 0x0000);
19784                 MP_WritePhyUshort(sc, 0x13, 0xa014);
19785                 MP_WritePhyUshort(sc, 0x14, 0x2c04);
19786                 MP_WritePhyUshort(sc, 0x14, 0x2c07);
19787                 MP_WritePhyUshort(sc, 0x14, 0x2c07);
19788                 MP_WritePhyUshort(sc, 0x14, 0x2c07);
19789                 MP_WritePhyUshort(sc, 0x14, 0xa304);
19790                 MP_WritePhyUshort(sc, 0x14, 0xa301);
19791                 MP_WritePhyUshort(sc, 0x14, 0x207e);
19792                 MP_WritePhyUshort(sc, 0x13, 0xa01a);
19793                 MP_WritePhyUshort(sc, 0x14, 0x0000);
19794                 MP_WritePhyUshort(sc, 0x13, 0xa006);
19795                 MP_WritePhyUshort(sc, 0x14, 0x0fff);
19796                 MP_WritePhyUshort(sc, 0x13, 0xa004);
19797                 MP_WritePhyUshort(sc, 0x14, 0x0fff);
19798                 MP_WritePhyUshort(sc, 0x13, 0xa002);
19799                 MP_WritePhyUshort(sc, 0x14, 0x0fff);
19800                 MP_WritePhyUshort(sc, 0x13, 0xa000);
19801                 MP_WritePhyUshort(sc, 0x14, 0x107c);
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, 0x8146);
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
19821                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
19822                 ClearEthPhyBit(sc, 0x14, BIT_8);
19823                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
19824                 SetEthPhyBit(sc, 0x11, BIT_7);
19825                 SetEthPhyBit(sc, 0x11, BIT_6);
19826                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19827                 MP_WritePhyUshort(sc, 0x13, 0x8084);
19828                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
19829                 SetEthPhyBit(sc, 0x10, BIT_12);
19830                 SetEthPhyBit(sc, 0x10, BIT_1);
19831                 SetEthPhyBit(sc, 0x10, BIT_0);
19832
19833
19834                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19835                 MP_WritePhyUshort(sc, 0x13, 0x8012);
19836                 SetEthPhyBit(sc, 0x14, BIT_15);
19837                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
19838
19839                 MP_WritePhyUshort(sc, 0x1F, 0x0BCE);
19840                 MP_WritePhyUshort(sc, 0x12, 0x8860);
19841                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
19842
19843                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19844                 MP_WritePhyUshort(sc, 0x13, 0x80F3);
19845                 ClearAndSetEthPhyBit(sc,
19846                                      0x14,
19847                                      0xFF00 ,
19848                                      0x8B00
19849                                     );
19850                 MP_WritePhyUshort(sc, 0x13, 0x80F0);
19851                 ClearAndSetEthPhyBit(sc,
19852                                      0x14,
19853                                      0xFF00 ,
19854                                      0x3A00
19855                                     );
19856                 MP_WritePhyUshort(sc, 0x13, 0x80EF);
19857                 ClearAndSetEthPhyBit(sc,
19858                                      0x14,
19859                                      0xFF00 ,
19860                                      0x0500
19861                                     );
19862                 MP_WritePhyUshort(sc, 0x13, 0x80F6);
19863                 ClearAndSetEthPhyBit(sc,
19864                                      0x14,
19865                                      0xFF00 ,
19866                                      0x6E00
19867                                     );
19868                 MP_WritePhyUshort(sc, 0x13, 0x80EC);
19869                 ClearAndSetEthPhyBit(sc,
19870                                      0x14,
19871                                      0xFF00 ,
19872                                      0x6800
19873                                     );
19874                 MP_WritePhyUshort(sc, 0x13, 0x80ED);
19875                 ClearAndSetEthPhyBit(sc,
19876                                      0x14,
19877                                      0xFF00 ,
19878                                      0x7C00
19879                                     );
19880                 MP_WritePhyUshort(sc, 0x13, 0x80F2);
19881                 ClearAndSetEthPhyBit(sc,
19882                                      0x14,
19883                                      0xFF00 ,
19884                                      0xF400
19885                                     );
19886                 MP_WritePhyUshort(sc, 0x13, 0x80F4);
19887                 ClearAndSetEthPhyBit(sc,
19888                                      0x14,
19889                                      0xFF00 ,
19890                                      0x8500
19891                                     );
19892
19893                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19894                 MP_WritePhyUshort(sc, 0x13, 0x8110);
19895                 ClearAndSetEthPhyBit(sc,
19896                                      0x14,
19897                                      0xFF00 ,
19898                                      0xA800
19899                                     );
19900                 MP_WritePhyUshort(sc, 0x13, 0x810F);
19901                 ClearAndSetEthPhyBit(sc,
19902                                      0x14,
19903                                      0xFF00 ,
19904                                      0x1D00
19905                                     );
19906                 MP_WritePhyUshort(sc, 0x13, 0x8111);
19907                 ClearAndSetEthPhyBit(sc,
19908                                      0x14,
19909                                      0xFF00 ,
19910                                      0xF500
19911                                     );
19912                 MP_WritePhyUshort(sc, 0x13, 0x8113);
19913                 ClearAndSetEthPhyBit(sc,
19914                                      0x14,
19915                                      0xFF00 ,
19916                                      0x6100
19917                                     );
19918                 MP_WritePhyUshort(sc, 0x13, 0x8115);
19919                 ClearAndSetEthPhyBit(sc,
19920                                      0x14,
19921                                      0xFF00 ,
19922                                      0x9200
19923                                     );
19924                 MP_WritePhyUshort(sc, 0x13, 0x810E);
19925                 ClearAndSetEthPhyBit(sc,
19926                                      0x14,
19927                                      0xFF00 ,
19928                                      0x0400
19929                                     );
19930                 MP_WritePhyUshort(sc, 0x13, 0x810C);
19931                 ClearAndSetEthPhyBit(sc,
19932                                      0x14,
19933                                      0xFF00 ,
19934                                      0x7C00
19935                                     );
19936                 MP_WritePhyUshort(sc, 0x13, 0x810B);
19937                 ClearAndSetEthPhyBit(sc,
19938                                      0x14,
19939                                      0xFF00 ,
19940                                      0x5A00
19941                                     );
19942
19943                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19944                 MP_WritePhyUshort(sc, 0x13, 0x80D1);
19945                 ClearAndSetEthPhyBit(sc,
19946                                      0x14,
19947                                      0xFF00 ,
19948                                      0xFF00
19949                                     );
19950                 MP_WritePhyUshort(sc, 0x13, 0x80CD);
19951                 ClearAndSetEthPhyBit(sc,
19952                                      0x14,
19953                                      0xFF00 ,
19954                                      0x9E00
19955                                     );
19956                 MP_WritePhyUshort(sc, 0x13, 0x80D3);
19957                 ClearAndSetEthPhyBit(sc,
19958                                      0x14,
19959                                      0xFF00 ,
19960                                      0x0E00
19961                                     );
19962                 MP_WritePhyUshort(sc, 0x13, 0x80D5);
19963                 ClearAndSetEthPhyBit(sc,
19964                                      0x14,
19965                                      0xFF00 ,
19966                                      0xCA00
19967                                     );
19968                 MP_WritePhyUshort(sc, 0x13, 0x80D7);
19969                 ClearAndSetEthPhyBit(sc,
19970                                      0x14,
19971                                      0xFF00 ,
19972                                      0x8400
19973                                     );
19974
19975                 if (phy_power_saving == 1) {
19976                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19977                         SetEthPhyBit(sc, 0x10, BIT_2);
19978                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
19979                 } else {
19980                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19981                         ClearEthPhyBit(sc, 0x10, BIT_2);
19982                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
19983                         DELAY(20000);
19984                 }
19985
19986                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
19987                 MP_WritePhyUshort(sc, 0x13, 0x8011);
19988                 ClearEthPhyBit(sc, 0x14, BIT_14);
19989                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
19990                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
19991                 MP_WritePhyUshort(sc, 0x00, 0x9200);
19992         } else if (sc->re_type == MACFG_60) {
19993                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
19994                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
19995                 PhyRegValue |= BIT_4;
19996                 MP_WritePhyUshort(sc, 0x10, PhyRegValue);
19997
19998                 MP_WritePhyUshort(sc, 0x1f, 0x0B80);
19999                 WaitCnt = 0;
20000                 do {
20001                         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
20002                         PhyRegValue &= 0x0040;
20003                         DELAY(50);
20004                         DELAY(50);
20005                         WaitCnt++;
20006                 } while(PhyRegValue != 0x0040 && WaitCnt <1000);
20007
20008                 MP_WritePhyUshort(sc, 0x1f, 0x0A43);
20009                 MP_WritePhyUshort(sc, 0x13, 0x8146);
20010                 MP_WritePhyUshort(sc, 0x14, 0x0100);
20011                 MP_WritePhyUshort(sc, 0x13, 0xB82E);
20012                 MP_WritePhyUshort(sc, 0x14, 0x0001);
20013
20014                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
20015                 MP_WritePhyUshort(sc, 0x13, 0xb820);
20016                 MP_WritePhyUshort(sc, 0x14, 0x0290);
20017                 MP_WritePhyUshort(sc, 0x13, 0xa012);
20018                 MP_WritePhyUshort(sc, 0x14, 0x0000);
20019                 MP_WritePhyUshort(sc, 0x13, 0xa014);
20020                 MP_WritePhyUshort(sc, 0x14, 0x2c04);
20021                 MP_WritePhyUshort(sc, 0x14, 0x2c07);
20022                 MP_WritePhyUshort(sc, 0x14, 0x2c07);
20023                 MP_WritePhyUshort(sc, 0x14, 0x2c07);
20024                 MP_WritePhyUshort(sc, 0x14, 0xa304);
20025                 MP_WritePhyUshort(sc, 0x14, 0xa301);
20026                 MP_WritePhyUshort(sc, 0x14, 0x207e);
20027                 MP_WritePhyUshort(sc, 0x13, 0xa01a);
20028                 MP_WritePhyUshort(sc, 0x14, 0x0000);
20029                 MP_WritePhyUshort(sc, 0x13, 0xa006);
20030                 MP_WritePhyUshort(sc, 0x14, 0x0fff);
20031                 MP_WritePhyUshort(sc, 0x13, 0xa004);
20032                 MP_WritePhyUshort(sc, 0x14, 0x0fff);
20033                 MP_WritePhyUshort(sc, 0x13, 0xa002);
20034                 MP_WritePhyUshort(sc, 0x14, 0x0fff);
20035                 MP_WritePhyUshort(sc, 0x13, 0xa000);
20036                 MP_WritePhyUshort(sc, 0x14, 0x107c);
20037                 MP_WritePhyUshort(sc, 0x13, 0xb820);
20038                 MP_WritePhyUshort(sc, 0x14, 0x0210);
20039
20040                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
20041                 MP_WritePhyUshort(sc, 0x13, 0x0000);
20042                 MP_WritePhyUshort(sc, 0x14, 0x0000);
20043                 MP_WritePhyUshort(sc, 0x1f, 0x0B82);
20044                 PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
20045                 PhyRegValue &= ~(BIT_0);
20046                 MP_WritePhyUshort(sc, 0x17, PhyRegValue);
20047                 MP_WritePhyUshort(sc, 0x1f, 0x0A43);
20048                 MP_WritePhyUshort(sc, 0x13, 0x8146);
20049                 MP_WritePhyUshort(sc, 0x14, 0x0000);
20050
20051                 MP_WritePhyUshort(sc,0x1f, 0x0B82);
20052                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
20053                 PhyRegValue &= ~(BIT_4);
20054                 MP_WritePhyUshort(sc,0x10, PhyRegValue);
20055
20056                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
20057                 MP_WritePhyUshort(sc, 0x13, 0x8012);
20058                 SetEthPhyBit(sc, 0x14, BIT_15);
20059                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
20060
20061                 MP_WritePhyUshort(sc, 0x1F, 0x0BCE);
20062                 MP_WritePhyUshort(sc, 0x12, 0x8860);
20063                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
20064
20065                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
20066                 MP_WritePhyUshort(sc, 0x13, 0x80F3);
20067                 ClearAndSetEthPhyBit(sc,
20068                                      0x14,
20069                                      0xFF00 ,
20070                                      0x8B00
20071                                     );
20072                 MP_WritePhyUshort(sc, 0x13, 0x80F0);
20073                 ClearAndSetEthPhyBit(sc,
20074                                      0x14,
20075                                      0xFF00 ,
20076                                      0x3A00
20077                                     );
20078                 MP_WritePhyUshort(sc, 0x13, 0x80EF);
20079                 ClearAndSetEthPhyBit(sc,
20080                                      0x14,
20081                                      0xFF00 ,
20082                                      0x0500
20083                                     );
20084                 MP_WritePhyUshort(sc, 0x13, 0x80F6);
20085                 ClearAndSetEthPhyBit(sc,
20086                                      0x14,
20087                                      0xFF00 ,
20088                                      0x6E00
20089                                     );
20090                 MP_WritePhyUshort(sc, 0x13, 0x80EC);
20091                 ClearAndSetEthPhyBit(sc,
20092                                      0x14,
20093                                      0xFF00 ,
20094                                      0x6800
20095                                     );
20096                 MP_WritePhyUshort(sc, 0x13, 0x80ED);
20097                 ClearAndSetEthPhyBit(sc,
20098                                      0x14,
20099                                      0xFF00 ,
20100                                      0x7C00
20101                                     );
20102                 MP_WritePhyUshort(sc, 0x13, 0x80F2);
20103                 ClearAndSetEthPhyBit(sc,
20104                                      0x14,
20105                                      0xFF00 ,
20106                                      0xF400
20107                                     );
20108                 MP_WritePhyUshort(sc, 0x13, 0x80F4);
20109                 ClearAndSetEthPhyBit(sc,
20110                                      0x14,
20111                                      0xFF00 ,
20112                                      0x8500
20113                                     );
20114
20115                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
20116                 MP_WritePhyUshort(sc, 0x13, 0x8110);
20117                 ClearAndSetEthPhyBit(sc,
20118                                      0x14,
20119                                      0xFF00 ,
20120                                      0xA800
20121                                     );
20122                 MP_WritePhyUshort(sc, 0x13, 0x810F);
20123                 ClearAndSetEthPhyBit(sc,
20124                                      0x14,
20125                                      0xFF00 ,
20126                                      0x1D00
20127                                     );
20128                 MP_WritePhyUshort(sc, 0x13, 0x8111);
20129                 ClearAndSetEthPhyBit(sc,
20130                                      0x14,
20131                                      0xFF00 ,
20132                                      0xF500
20133                                     );
20134                 MP_WritePhyUshort(sc, 0x13, 0x8113);
20135                 ClearAndSetEthPhyBit(sc,
20136                                      0x14,
20137                                      0xFF00 ,
20138                                      0x6100
20139                                     );
20140                 MP_WritePhyUshort(sc, 0x13, 0x8115);
20141                 ClearAndSetEthPhyBit(sc,
20142                                      0x14,
20143                                      0xFF00 ,
20144                                      0x9200
20145                                     );
20146                 MP_WritePhyUshort(sc, 0x13, 0x810E);
20147                 ClearAndSetEthPhyBit(sc,
20148                                      0x14,
20149                                      0xFF00 ,
20150                                      0x0400
20151                                     );
20152                 MP_WritePhyUshort(sc, 0x13, 0x810C);
20153                 ClearAndSetEthPhyBit(sc,
20154                                      0x14,
20155                                      0xFF00 ,
20156                                      0x7C00
20157                                     );
20158                 MP_WritePhyUshort(sc, 0x13, 0x810B);
20159                 ClearAndSetEthPhyBit(sc,
20160                                      0x14,
20161                                      0xFF00 ,
20162                                      0x5A00
20163                                     );
20164
20165                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
20166                 MP_WritePhyUshort(sc, 0x13, 0x80D1);
20167                 ClearAndSetEthPhyBit(sc,
20168                                      0x14,
20169                                      0xFF00 ,
20170                                      0xFF00
20171                                     );
20172                 MP_WritePhyUshort(sc, 0x13, 0x80CD);
20173                 ClearAndSetEthPhyBit(sc,
20174                                      0x14,
20175                                      0xFF00 ,
20176                                      0x9E00
20177                                     );
20178                 MP_WritePhyUshort(sc, 0x13, 0x80D3);
20179                 ClearAndSetEthPhyBit(sc,
20180                                      0x14,
20181                                      0xFF00 ,
20182                                      0x0E00
20183                                     );
20184                 MP_WritePhyUshort(sc, 0x13, 0x80D5);
20185                 ClearAndSetEthPhyBit(sc,
20186                                      0x14,
20187                                      0xFF00 ,
20188                                      0xCA00
20189                                     );
20190                 MP_WritePhyUshort(sc, 0x13, 0x80D7);
20191                 ClearAndSetEthPhyBit(sc,
20192                                      0x14,
20193                                      0xFF00 ,
20194                                      0x8400
20195                                     );
20196
20197                 if (phy_power_saving == 1) {
20198                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
20199                         SetEthPhyBit(sc, 0x10, BIT_2);
20200                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
20201                 } else {
20202                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
20203                         ClearEthPhyBit(sc, 0x10, BIT_2);
20204                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
20205                         DELAY(20000);
20206                 }
20207
20208                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
20209                 MP_WritePhyUshort(sc, 0x13, 0x8011);
20210                 ClearEthPhyBit(sc, 0x14, BIT_14);
20211                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
20212                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
20213                 MP_WritePhyUshort(sc, 0x00, 0x9200);
20214         } else if (sc->re_type == MACFG_61) {
20215                 MP_WritePhyUshort(sc,0x1f, 0x0B82);
20216                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
20217                 PhyRegValue |= BIT_4;
20218                 MP_WritePhyUshort(sc,0x10, PhyRegValue);
20219
20220                 MP_WritePhyUshort(sc,0x1f, 0x0B80);
20221                 WaitCnt = 0;
20222                 do {
20223                         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
20224                         PhyRegValue &= 0x0040;
20225                         DELAY(50);
20226                         DELAY(50);
20227                         WaitCnt++;
20228                 } while(PhyRegValue != 0x0040 && WaitCnt <1000);
20229
20230                 MP_WritePhyUshort(sc,0x1f, 0x0A43);
20231                 MP_WritePhyUshort(sc,0x13, 0x8146);
20232                 MP_WritePhyUshort(sc,0x14, 0x2700);
20233                 MP_WritePhyUshort(sc,0x13, 0xB82E);
20234                 MP_WritePhyUshort(sc,0x14, 0x0001);
20235
20236                 MP_WritePhyUshort(sc,0x1F, 0x0A43);
20237                 MP_WritePhyUshort(sc, 0x13, 0xb820);
20238                 MP_WritePhyUshort(sc, 0x14, 0x0090);
20239                 MP_WritePhyUshort(sc, 0x13, 0xa012);
20240                 MP_WritePhyUshort(sc, 0x14, 0x0000);
20241                 MP_WritePhyUshort(sc, 0x13, 0xa014);
20242                 MP_WritePhyUshort(sc, 0x14, 0x2c04);
20243                 MP_WritePhyUshort(sc, 0x14, 0x2c1b);
20244                 MP_WritePhyUshort(sc, 0x14, 0x2c65);
20245                 MP_WritePhyUshort(sc, 0x14, 0x2d14);
20246                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20247                 MP_WritePhyUshort(sc, 0x14, 0x4092);
20248                 MP_WritePhyUshort(sc, 0x14, 0xba04);
20249                 MP_WritePhyUshort(sc, 0x14, 0x3084);
20250                 MP_WritePhyUshort(sc, 0x14, 0x1d04);
20251                 MP_WritePhyUshort(sc, 0x14, 0x1cdd);
20252                 MP_WritePhyUshort(sc, 0x14, 0x1ce8);
20253                 MP_WritePhyUshort(sc, 0x14, 0xaeff);
20254                 MP_WritePhyUshort(sc, 0x14, 0xaf02);
20255                 MP_WritePhyUshort(sc, 0x14, 0x8f02);
20256                 MP_WritePhyUshort(sc, 0x14, 0x8eff);
20257                 MP_WritePhyUshort(sc, 0x14, 0xce01);
20258                 MP_WritePhyUshort(sc, 0x14, 0xe070);
20259                 MP_WritePhyUshort(sc, 0x14, 0x0f00);
20260                 MP_WritePhyUshort(sc, 0x14, 0xaf01);
20261                 MP_WritePhyUshort(sc, 0x14, 0x8f01);
20262                 MP_WritePhyUshort(sc, 0x14, 0xd712);
20263                 MP_WritePhyUshort(sc, 0x14, 0x5fe8);
20264                 MP_WritePhyUshort(sc, 0x14, 0xaf02);
20265                 MP_WritePhyUshort(sc, 0x14, 0x8f02);
20266                 MP_WritePhyUshort(sc, 0x14, 0x8e01);
20267                 MP_WritePhyUshort(sc, 0x14, 0x1cf2);
20268                 MP_WritePhyUshort(sc, 0x14, 0x2825);
20269                 MP_WritePhyUshort(sc, 0x14, 0xd05a);
20270                 MP_WritePhyUshort(sc, 0x14, 0xd19a);
20271                 MP_WritePhyUshort(sc, 0x14, 0xd709);
20272                 MP_WritePhyUshort(sc, 0x14, 0x608f);
20273                 MP_WritePhyUshort(sc, 0x14, 0xd06b);
20274                 MP_WritePhyUshort(sc, 0x14, 0xd18a);
20275                 MP_WritePhyUshort(sc, 0x14, 0x2c25);
20276                 MP_WritePhyUshort(sc, 0x14, 0xd0be);
20277                 MP_WritePhyUshort(sc, 0x14, 0xd188);
20278                 MP_WritePhyUshort(sc, 0x14, 0x2c25);
20279                 MP_WritePhyUshort(sc, 0x14, 0xd708);
20280                 MP_WritePhyUshort(sc, 0x14, 0x4072);
20281                 MP_WritePhyUshort(sc, 0x14, 0xc104);
20282                 MP_WritePhyUshort(sc, 0x14, 0x2c37);
20283                 MP_WritePhyUshort(sc, 0x14, 0x4076);
20284                 MP_WritePhyUshort(sc, 0x14, 0xc110);
20285                 MP_WritePhyUshort(sc, 0x14, 0x2c37);
20286                 MP_WritePhyUshort(sc, 0x14, 0x4071);
20287                 MP_WritePhyUshort(sc, 0x14, 0xc102);
20288                 MP_WritePhyUshort(sc, 0x14, 0x2c37);
20289                 MP_WritePhyUshort(sc, 0x14, 0x4070);
20290                 MP_WritePhyUshort(sc, 0x14, 0xc101);
20291                 MP_WritePhyUshort(sc, 0x14, 0x2c37);
20292                 MP_WritePhyUshort(sc, 0x14, 0x1786);
20293                 MP_WritePhyUshort(sc, 0x14, 0xd709);
20294                 MP_WritePhyUshort(sc, 0x14, 0x3390);
20295                 MP_WritePhyUshort(sc, 0x14, 0x5c32);
20296                 MP_WritePhyUshort(sc, 0x14, 0x2c47);
20297                 MP_WritePhyUshort(sc, 0x14, 0x1786);
20298                 MP_WritePhyUshort(sc, 0x14, 0xd708);
20299                 MP_WritePhyUshort(sc, 0x14, 0x6193);
20300                 MP_WritePhyUshort(sc, 0x14, 0xd709);
20301                 MP_WritePhyUshort(sc, 0x14, 0x5f9d);
20302                 MP_WritePhyUshort(sc, 0x14, 0x408b);
20303                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20304                 MP_WritePhyUshort(sc, 0x14, 0x6042);
20305                 MP_WritePhyUshort(sc, 0x14, 0xb401);
20306                 MP_WritePhyUshort(sc, 0x14, 0x1786);
20307                 MP_WritePhyUshort(sc, 0x14, 0xd708);
20308                 MP_WritePhyUshort(sc, 0x14, 0x6073);
20309                 MP_WritePhyUshort(sc, 0x14, 0x5fbc);
20310                 MP_WritePhyUshort(sc, 0x14, 0x2c46);
20311                 MP_WritePhyUshort(sc, 0x14, 0x26fe);
20312                 MP_WritePhyUshort(sc, 0x14, 0xb280);
20313                 MP_WritePhyUshort(sc, 0x14, 0xa841);
20314                 MP_WritePhyUshort(sc, 0x14, 0x94e0);
20315                 MP_WritePhyUshort(sc, 0x14, 0x8710);
20316                 MP_WritePhyUshort(sc, 0x14, 0xd709);
20317                 MP_WritePhyUshort(sc, 0x14, 0x42ec);
20318                 MP_WritePhyUshort(sc, 0x14, 0x606d);
20319                 MP_WritePhyUshort(sc, 0x14, 0xd207);
20320                 MP_WritePhyUshort(sc, 0x14, 0x2c50);
20321                 MP_WritePhyUshort(sc, 0x14, 0xd203);
20322                 MP_WritePhyUshort(sc, 0x14, 0x33ff);
20323                 MP_WritePhyUshort(sc, 0x14, 0x5647);
20324                 MP_WritePhyUshort(sc, 0x14, 0x3275);
20325                 MP_WritePhyUshort(sc, 0x14, 0x7c57);
20326                 MP_WritePhyUshort(sc, 0x14, 0xb240);
20327                 MP_WritePhyUshort(sc, 0x14, 0xb402);
20328                 MP_WritePhyUshort(sc, 0x14, 0x2647);
20329                 MP_WritePhyUshort(sc, 0x14, 0x6096);
20330                 MP_WritePhyUshort(sc, 0x14, 0xb240);
20331                 MP_WritePhyUshort(sc, 0x14, 0xb406);
20332                 MP_WritePhyUshort(sc, 0x14, 0x2647);
20333                 MP_WritePhyUshort(sc, 0x14, 0x31d7);
20334                 MP_WritePhyUshort(sc, 0x14, 0x7c60);
20335                 MP_WritePhyUshort(sc, 0x14, 0xb240);
20336                 MP_WritePhyUshort(sc, 0x14, 0xb40e);
20337                 MP_WritePhyUshort(sc, 0x14, 0x2647);
20338                 MP_WritePhyUshort(sc, 0x14, 0xb410);
20339                 MP_WritePhyUshort(sc, 0x14, 0x8802);
20340                 MP_WritePhyUshort(sc, 0x14, 0xb240);
20341                 MP_WritePhyUshort(sc, 0x14, 0x940e);
20342                 MP_WritePhyUshort(sc, 0x14, 0x2647);
20343                 MP_WritePhyUshort(sc, 0x14, 0xba04);
20344                 MP_WritePhyUshort(sc, 0x14, 0x1cdd);
20345                 MP_WritePhyUshort(sc, 0x14, 0xa902);
20346                 MP_WritePhyUshort(sc, 0x14, 0xd711);
20347                 MP_WritePhyUshort(sc, 0x14, 0x4045);
20348                 MP_WritePhyUshort(sc, 0x14, 0xa980);
20349                 MP_WritePhyUshort(sc, 0x14, 0x3003);
20350                 MP_WritePhyUshort(sc, 0x14, 0x5a19);
20351                 MP_WritePhyUshort(sc, 0x14, 0xa540);
20352                 MP_WritePhyUshort(sc, 0x14, 0xa601);
20353                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20354                 MP_WritePhyUshort(sc, 0x14, 0x4043);
20355                 MP_WritePhyUshort(sc, 0x14, 0xa910);
20356                 MP_WritePhyUshort(sc, 0x14, 0xd711);
20357                 MP_WritePhyUshort(sc, 0x14, 0x60a0);
20358                 MP_WritePhyUshort(sc, 0x14, 0xca33);
20359                 MP_WritePhyUshort(sc, 0x14, 0xcb33);
20360                 MP_WritePhyUshort(sc, 0x14, 0xa941);
20361                 MP_WritePhyUshort(sc, 0x14, 0x2c7b);
20362                 MP_WritePhyUshort(sc, 0x14, 0xcaff);
20363                 MP_WritePhyUshort(sc, 0x14, 0xcbff);
20364                 MP_WritePhyUshort(sc, 0x14, 0xa921);
20365                 MP_WritePhyUshort(sc, 0x14, 0xce02);
20366                 MP_WritePhyUshort(sc, 0x14, 0xe070);
20367                 MP_WritePhyUshort(sc, 0x14, 0x0f10);
20368                 MP_WritePhyUshort(sc, 0x14, 0xaf01);
20369                 MP_WritePhyUshort(sc, 0x14, 0x8f01);
20370                 MP_WritePhyUshort(sc, 0x14, 0x1791);
20371                 MP_WritePhyUshort(sc, 0x14, 0x8e02);
20372                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20373                 MP_WritePhyUshort(sc, 0x14, 0x41a3);
20374                 MP_WritePhyUshort(sc, 0x14, 0xa140);
20375                 MP_WritePhyUshort(sc, 0x14, 0xa220);
20376                 MP_WritePhyUshort(sc, 0x14, 0xce10);
20377                 MP_WritePhyUshort(sc, 0x14, 0xe070);
20378                 MP_WritePhyUshort(sc, 0x14, 0x0f40);
20379                 MP_WritePhyUshort(sc, 0x14, 0xaf01);
20380                 MP_WritePhyUshort(sc, 0x14, 0x8f01);
20381                 MP_WritePhyUshort(sc, 0x14, 0x1791);
20382                 MP_WritePhyUshort(sc, 0x14, 0x8e10);
20383                 MP_WritePhyUshort(sc, 0x14, 0x8140);
20384                 MP_WritePhyUshort(sc, 0x14, 0x8220);
20385                 MP_WritePhyUshort(sc, 0x14, 0xa301);
20386                 MP_WritePhyUshort(sc, 0x14, 0x17b2);
20387                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20388                 MP_WritePhyUshort(sc, 0x14, 0x609c);
20389                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20390                 MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20391                 MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20392                 MP_WritePhyUshort(sc, 0x14, 0x1cf0);
20393                 MP_WritePhyUshort(sc, 0x14, 0xce04);
20394                 MP_WritePhyUshort(sc, 0x14, 0xe070);
20395                 MP_WritePhyUshort(sc, 0x14, 0x0f20);
20396                 MP_WritePhyUshort(sc, 0x14, 0xaf01);
20397                 MP_WritePhyUshort(sc, 0x14, 0x8f01);
20398                 MP_WritePhyUshort(sc, 0x14, 0x1791);
20399                 MP_WritePhyUshort(sc, 0x14, 0x8e04);
20400                 MP_WritePhyUshort(sc, 0x14, 0x6044);
20401                 MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20402                 MP_WritePhyUshort(sc, 0x14, 0xa520);
20403                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20404                 MP_WritePhyUshort(sc, 0x14, 0x4043);
20405                 MP_WritePhyUshort(sc, 0x14, 0x2cc8);
20406                 MP_WritePhyUshort(sc, 0x14, 0xe00f);
20407                 MP_WritePhyUshort(sc, 0x14, 0x0501);
20408                 MP_WritePhyUshort(sc, 0x14, 0x1cf6);
20409                 MP_WritePhyUshort(sc, 0x14, 0xb801);
20410                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20411                 MP_WritePhyUshort(sc, 0x14, 0x4060);
20412                 MP_WritePhyUshort(sc, 0x14, 0x7fc4);
20413                 MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20414                 MP_WritePhyUshort(sc, 0x14, 0x1cfc);
20415                 MP_WritePhyUshort(sc, 0x14, 0xe00f);
20416                 MP_WritePhyUshort(sc, 0x14, 0x0502);
20417                 MP_WritePhyUshort(sc, 0x14, 0x1cf6);
20418                 MP_WritePhyUshort(sc, 0x14, 0xb802);
20419                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20420                 MP_WritePhyUshort(sc, 0x14, 0x4061);
20421                 MP_WritePhyUshort(sc, 0x14, 0x7fc4);
20422                 MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20423                 MP_WritePhyUshort(sc, 0x14, 0x1cfc);
20424                 MP_WritePhyUshort(sc, 0x14, 0xe00f);
20425                 MP_WritePhyUshort(sc, 0x14, 0x0504);
20426                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20427                 MP_WritePhyUshort(sc, 0x14, 0x6099);
20428                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20429                 MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20430                 MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20431                 MP_WritePhyUshort(sc, 0x14, 0xc17f);
20432                 MP_WritePhyUshort(sc, 0x14, 0xc200);
20433                 MP_WritePhyUshort(sc, 0x14, 0xc43f);
20434                 MP_WritePhyUshort(sc, 0x14, 0xcc03);
20435                 MP_WritePhyUshort(sc, 0x14, 0xa701);
20436                 MP_WritePhyUshort(sc, 0x14, 0xa510);
20437                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20438                 MP_WritePhyUshort(sc, 0x14, 0x4018);
20439                 MP_WritePhyUshort(sc, 0x14, 0x9910);
20440                 MP_WritePhyUshort(sc, 0x14, 0x8510);
20441                 MP_WritePhyUshort(sc, 0x14, 0x28a1);
20442                 MP_WritePhyUshort(sc, 0x14, 0xe00f);
20443                 MP_WritePhyUshort(sc, 0x14, 0x0504);
20444                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20445                 MP_WritePhyUshort(sc, 0x14, 0x6099);
20446                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20447                 MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20448                 MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20449                 MP_WritePhyUshort(sc, 0x14, 0xa608);
20450                 MP_WritePhyUshort(sc, 0x14, 0xc17d);
20451                 MP_WritePhyUshort(sc, 0x14, 0xc200);
20452                 MP_WritePhyUshort(sc, 0x14, 0xc43f);
20453                 MP_WritePhyUshort(sc, 0x14, 0xcc03);
20454                 MP_WritePhyUshort(sc, 0x14, 0xa701);
20455                 MP_WritePhyUshort(sc, 0x14, 0xa510);
20456                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20457                 MP_WritePhyUshort(sc, 0x14, 0x4018);
20458                 MP_WritePhyUshort(sc, 0x14, 0x9910);
20459                 MP_WritePhyUshort(sc, 0x14, 0x8510);
20460                 MP_WritePhyUshort(sc, 0x14, 0x298e);
20461                 MP_WritePhyUshort(sc, 0x14, 0x17bd);
20462                 MP_WritePhyUshort(sc, 0x14, 0x2815);
20463                 MP_WritePhyUshort(sc, 0x14, 0xc000);
20464                 MP_WritePhyUshort(sc, 0x14, 0xc100);
20465                 MP_WritePhyUshort(sc, 0x14, 0xc200);
20466                 MP_WritePhyUshort(sc, 0x14, 0xc300);
20467                 MP_WritePhyUshort(sc, 0x14, 0xc400);
20468                 MP_WritePhyUshort(sc, 0x14, 0xc500);
20469                 MP_WritePhyUshort(sc, 0x14, 0xc600);
20470                 MP_WritePhyUshort(sc, 0x14, 0xc7c1);
20471                 MP_WritePhyUshort(sc, 0x14, 0xc800);
20472                 MP_WritePhyUshort(sc, 0x14, 0xcc00);
20473                 MP_WritePhyUshort(sc, 0x14, 0x0800);
20474                 MP_WritePhyUshort(sc, 0x14, 0xca0f);
20475                 MP_WritePhyUshort(sc, 0x14, 0xcbff);
20476                 MP_WritePhyUshort(sc, 0x14, 0xa901);
20477                 MP_WritePhyUshort(sc, 0x14, 0x8902);
20478                 MP_WritePhyUshort(sc, 0x14, 0xc900);
20479                 MP_WritePhyUshort(sc, 0x14, 0xca00);
20480                 MP_WritePhyUshort(sc, 0x14, 0xcb00);
20481                 MP_WritePhyUshort(sc, 0x14, 0x0800);
20482                 MP_WritePhyUshort(sc, 0x14, 0xb804);
20483                 MP_WritePhyUshort(sc, 0x14, 0x0800);
20484                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20485                 MP_WritePhyUshort(sc, 0x14, 0x6044);
20486                 MP_WritePhyUshort(sc, 0x14, 0x9804);
20487                 MP_WritePhyUshort(sc, 0x14, 0x0800);
20488                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20489                 MP_WritePhyUshort(sc, 0x14, 0x6099);
20490                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20491                 MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20492                 MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20493                 MP_WritePhyUshort(sc, 0x14, 0x0800);
20494                 MP_WritePhyUshort(sc, 0x14, 0xa510);
20495                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20496                 MP_WritePhyUshort(sc, 0x14, 0x6098);
20497                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20498                 MP_WritePhyUshort(sc, 0x14, 0x7fa4);
20499                 MP_WritePhyUshort(sc, 0x14, 0x2cdb);
20500                 MP_WritePhyUshort(sc, 0x14, 0x8510);
20501                 MP_WritePhyUshort(sc, 0x14, 0x0800);
20502                 MP_WritePhyUshort(sc, 0x14, 0xd711);
20503                 MP_WritePhyUshort(sc, 0x14, 0x3003);
20504                 MP_WritePhyUshort(sc, 0x14, 0x1d08);
20505                 MP_WritePhyUshort(sc, 0x14, 0x2d12);
20506                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20507                 MP_WritePhyUshort(sc, 0x14, 0x60be);
20508                 MP_WritePhyUshort(sc, 0x14, 0xe060);
20509                 MP_WritePhyUshort(sc, 0x14, 0x0920);
20510                 MP_WritePhyUshort(sc, 0x14, 0x1cdd);
20511                 MP_WritePhyUshort(sc, 0x14, 0x2c90);
20512                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20513                 MP_WritePhyUshort(sc, 0x14, 0x3063);
20514                 MP_WritePhyUshort(sc, 0x14, 0x19b0);
20515                 MP_WritePhyUshort(sc, 0x14, 0x28d5);
20516                 MP_WritePhyUshort(sc, 0x14, 0x1cdd);
20517                 MP_WritePhyUshort(sc, 0x14, 0x2a25);
20518                 MP_WritePhyUshort(sc, 0x14, 0xa802);
20519                 MP_WritePhyUshort(sc, 0x14, 0xa303);
20520                 MP_WritePhyUshort(sc, 0x14, 0x843f);
20521                 MP_WritePhyUshort(sc, 0x14, 0x81ff);
20522                 MP_WritePhyUshort(sc, 0x14, 0x8208);
20523                 MP_WritePhyUshort(sc, 0x14, 0xa201);
20524                 MP_WritePhyUshort(sc, 0x14, 0xc001);
20525                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20526                 MP_WritePhyUshort(sc, 0x14, 0x30a0);
20527                 MP_WritePhyUshort(sc, 0x14, 0x0d23);
20528                 MP_WritePhyUshort(sc, 0x14, 0x30a0);
20529                 MP_WritePhyUshort(sc, 0x14, 0x3d1a);
20530                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20531                 MP_WritePhyUshort(sc, 0x14, 0x7f4c);
20532                 MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20533                 MP_WritePhyUshort(sc, 0x14, 0xe003);
20534                 MP_WritePhyUshort(sc, 0x14, 0x0202);
20535                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20536                 MP_WritePhyUshort(sc, 0x14, 0x6090);
20537                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20538                 MP_WritePhyUshort(sc, 0x14, 0x7fac);
20539                 MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20540                 MP_WritePhyUshort(sc, 0x14, 0xa20c);
20541                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20542                 MP_WritePhyUshort(sc, 0x14, 0x6091);
20543                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20544                 MP_WritePhyUshort(sc, 0x14, 0x7fac);
20545                 MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20546                 MP_WritePhyUshort(sc, 0x14, 0x820e);
20547                 MP_WritePhyUshort(sc, 0x14, 0xa3e0);
20548                 MP_WritePhyUshort(sc, 0x14, 0xa520);
20549                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20550                 MP_WritePhyUshort(sc, 0x14, 0x609d);
20551                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20552                 MP_WritePhyUshort(sc, 0x14, 0x7fac);
20553                 MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20554                 MP_WritePhyUshort(sc, 0x14, 0x8520);
20555                 MP_WritePhyUshort(sc, 0x14, 0x6703);
20556                 MP_WritePhyUshort(sc, 0x14, 0x2d3b);
20557                 MP_WritePhyUshort(sc, 0x14, 0xa13e);
20558                 MP_WritePhyUshort(sc, 0x14, 0xc001);
20559                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20560                 MP_WritePhyUshort(sc, 0x14, 0x4000);
20561                 MP_WritePhyUshort(sc, 0x14, 0x6046);
20562                 MP_WritePhyUshort(sc, 0x14, 0x2d14);
20563                 MP_WritePhyUshort(sc, 0x14, 0xa43f);
20564                 MP_WritePhyUshort(sc, 0x14, 0xa101);
20565                 MP_WritePhyUshort(sc, 0x14, 0xc020);
20566                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20567                 MP_WritePhyUshort(sc, 0x14, 0x3121);
20568                 MP_WritePhyUshort(sc, 0x14, 0x0d4c);
20569                 MP_WritePhyUshort(sc, 0x14, 0x30c0);
20570                 MP_WritePhyUshort(sc, 0x14, 0x3d14);
20571                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20572                 MP_WritePhyUshort(sc, 0x14, 0x7f4c);
20573                 MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20574                 MP_WritePhyUshort(sc, 0x14, 0xa540);
20575                 MP_WritePhyUshort(sc, 0x14, 0xc001);
20576                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20577                 MP_WritePhyUshort(sc, 0x14, 0x4001);
20578                 MP_WritePhyUshort(sc, 0x14, 0xe00f);
20579                 MP_WritePhyUshort(sc, 0x14, 0x0501);
20580                 MP_WritePhyUshort(sc, 0x14, 0x1db3);
20581                 MP_WritePhyUshort(sc, 0x14, 0xc1c4);
20582                 MP_WritePhyUshort(sc, 0x14, 0xa268);
20583                 MP_WritePhyUshort(sc, 0x14, 0xa303);
20584                 MP_WritePhyUshort(sc, 0x14, 0x8420);
20585                 MP_WritePhyUshort(sc, 0x14, 0xe00f);
20586                 MP_WritePhyUshort(sc, 0x14, 0x0502);
20587                 MP_WritePhyUshort(sc, 0x14, 0x1db3);
20588                 MP_WritePhyUshort(sc, 0x14, 0xc002);
20589                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20590                 MP_WritePhyUshort(sc, 0x14, 0x4000);
20591                 MP_WritePhyUshort(sc, 0x14, 0x8208);
20592                 MP_WritePhyUshort(sc, 0x14, 0x8410);
20593                 MP_WritePhyUshort(sc, 0x14, 0xa121);
20594                 MP_WritePhyUshort(sc, 0x14, 0xc002);
20595                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20596                 MP_WritePhyUshort(sc, 0x14, 0x4000);
20597                 MP_WritePhyUshort(sc, 0x14, 0x8120);
20598                 MP_WritePhyUshort(sc, 0x14, 0x8180);
20599                 MP_WritePhyUshort(sc, 0x14, 0x1d9e);
20600                 MP_WritePhyUshort(sc, 0x14, 0xa180);
20601                 MP_WritePhyUshort(sc, 0x14, 0xa13a);
20602                 MP_WritePhyUshort(sc, 0x14, 0x8240);
20603                 MP_WritePhyUshort(sc, 0x14, 0xa430);
20604                 MP_WritePhyUshort(sc, 0x14, 0xc010);
20605                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20606                 MP_WritePhyUshort(sc, 0x14, 0x30e1);
20607                 MP_WritePhyUshort(sc, 0x14, 0x0b24);
20608                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20609                 MP_WritePhyUshort(sc, 0x14, 0x7f8c);
20610                 MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20611                 MP_WritePhyUshort(sc, 0x14, 0xa480);
20612                 MP_WritePhyUshort(sc, 0x14, 0xa230);
20613                 MP_WritePhyUshort(sc, 0x14, 0xa303);
20614                 MP_WritePhyUshort(sc, 0x14, 0xc001);
20615                 MP_WritePhyUshort(sc, 0x14, 0xd70c);
20616                 MP_WritePhyUshort(sc, 0x14, 0x4124);
20617                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20618                 MP_WritePhyUshort(sc, 0x14, 0x6120);
20619                 MP_WritePhyUshort(sc, 0x14, 0xd711);
20620                 MP_WritePhyUshort(sc, 0x14, 0x3128);
20621                 MP_WritePhyUshort(sc, 0x14, 0x3d7d);
20622                 MP_WritePhyUshort(sc, 0x14, 0x2d77);
20623                 MP_WritePhyUshort(sc, 0x14, 0xa801);
20624                 MP_WritePhyUshort(sc, 0x14, 0x2d73);
20625                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20626                 MP_WritePhyUshort(sc, 0x14, 0x4000);
20627                 MP_WritePhyUshort(sc, 0x14, 0xe018);
20628                 MP_WritePhyUshort(sc, 0x14, 0x0208);
20629                 MP_WritePhyUshort(sc, 0x14, 0xa1f8);
20630                 MP_WritePhyUshort(sc, 0x14, 0x8480);
20631                 MP_WritePhyUshort(sc, 0x14, 0xc004);
20632                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20633                 MP_WritePhyUshort(sc, 0x14, 0x4000);
20634                 MP_WritePhyUshort(sc, 0x14, 0x6046);
20635                 MP_WritePhyUshort(sc, 0x14, 0x2d14);
20636                 MP_WritePhyUshort(sc, 0x14, 0xa43f);
20637                 MP_WritePhyUshort(sc, 0x14, 0xa105);
20638                 MP_WritePhyUshort(sc, 0x14, 0x8228);
20639                 MP_WritePhyUshort(sc, 0x14, 0xc004);
20640                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20641                 MP_WritePhyUshort(sc, 0x14, 0x4000);
20642                 MP_WritePhyUshort(sc, 0x14, 0x81bc);
20643                 MP_WritePhyUshort(sc, 0x14, 0xa220);
20644                 MP_WritePhyUshort(sc, 0x14, 0x1d9e);
20645                 MP_WritePhyUshort(sc, 0x14, 0x8220);
20646                 MP_WritePhyUshort(sc, 0x14, 0xa1bc);
20647                 MP_WritePhyUshort(sc, 0x14, 0xc040);
20648                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20649                 MP_WritePhyUshort(sc, 0x14, 0x30e1);
20650                 MP_WritePhyUshort(sc, 0x14, 0x0b24);
20651                 MP_WritePhyUshort(sc, 0x14, 0x30e1);
20652                 MP_WritePhyUshort(sc, 0x14, 0x3d14);
20653                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20654                 MP_WritePhyUshort(sc, 0x14, 0x7f4c);
20655                 MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20656                 MP_WritePhyUshort(sc, 0x14, 0xa802);
20657                 MP_WritePhyUshort(sc, 0x14, 0xd70c);
20658                 MP_WritePhyUshort(sc, 0x14, 0x4244);
20659                 MP_WritePhyUshort(sc, 0x14, 0xa301);
20660                 MP_WritePhyUshort(sc, 0x14, 0xc004);
20661                 MP_WritePhyUshort(sc, 0x14, 0xd711);
20662                 MP_WritePhyUshort(sc, 0x14, 0x3128);
20663                 MP_WritePhyUshort(sc, 0x14, 0x3dac);
20664                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20665                 MP_WritePhyUshort(sc, 0x14, 0x5f80);
20666                 MP_WritePhyUshort(sc, 0x14, 0xd711);
20667                 MP_WritePhyUshort(sc, 0x14, 0x3109);
20668                 MP_WritePhyUshort(sc, 0x14, 0x3dae);
20669                 MP_WritePhyUshort(sc, 0x14, 0x2db2);
20670                 MP_WritePhyUshort(sc, 0x14, 0xa801);
20671                 MP_WritePhyUshort(sc, 0x14, 0x2da1);
20672                 MP_WritePhyUshort(sc, 0x14, 0xa802);
20673                 MP_WritePhyUshort(sc, 0x14, 0xc004);
20674                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20675                 MP_WritePhyUshort(sc, 0x14, 0x4000);
20676                 MP_WritePhyUshort(sc, 0x14, 0x0800);
20677                 MP_WritePhyUshort(sc, 0x14, 0xa510);
20678                 MP_WritePhyUshort(sc, 0x14, 0xd710);
20679                 MP_WritePhyUshort(sc, 0x14, 0x609a);
20680                 MP_WritePhyUshort(sc, 0x14, 0xd71e);
20681                 MP_WritePhyUshort(sc, 0x14, 0x7fac);
20682                 MP_WritePhyUshort(sc, 0x14, 0x2b1e);
20683                 MP_WritePhyUshort(sc, 0x14, 0x8510);
20684                 MP_WritePhyUshort(sc, 0x14, 0x0800);
20685                 MP_WritePhyUshort(sc, 0x13, 0xa01a);
20686                 MP_WritePhyUshort(sc, 0x14, 0x0000);
20687                 MP_WritePhyUshort(sc, 0x13, 0xa006);
20688                 MP_WritePhyUshort(sc, 0x14, 0x0b3e);
20689                 MP_WritePhyUshort(sc, 0x13, 0xa004);
20690                 MP_WritePhyUshort(sc, 0x14, 0x0828);
20691                 MP_WritePhyUshort(sc, 0x13, 0xa002);
20692                 MP_WritePhyUshort(sc, 0x14, 0x06dd);
20693                 MP_WritePhyUshort(sc, 0x13, 0xa000);
20694                 MP_WritePhyUshort(sc, 0x14, 0xf815);
20695                 MP_WritePhyUshort(sc, 0x13, 0xb820);
20696                 MP_WritePhyUshort(sc, 0x14, 0x0010);
20697
20698                 MP_WritePhyUshort(sc,0x1F, 0x0A43);
20699                 MP_WritePhyUshort(sc, 0x13, 0x83b0);
20700                 MP_WritePhyUshort(sc, 0x14, 0xaf83);
20701                 MP_WritePhyUshort(sc, 0x14, 0xbcaf);
20702                 MP_WritePhyUshort(sc, 0x14, 0x83c8);
20703                 MP_WritePhyUshort(sc, 0x14, 0xaf83);
20704                 MP_WritePhyUshort(sc, 0x14, 0xddaf);
20705                 MP_WritePhyUshort(sc, 0x14, 0x83e0);
20706                 MP_WritePhyUshort(sc, 0x14, 0x0204);
20707                 MP_WritePhyUshort(sc, 0x14, 0xa102);
20708                 MP_WritePhyUshort(sc, 0x14, 0x09b4);
20709                 MP_WritePhyUshort(sc, 0x14, 0x0284);
20710                 MP_WritePhyUshort(sc, 0x14, 0x62af);
20711                 MP_WritePhyUshort(sc, 0x14, 0x02ec);
20712                 MP_WritePhyUshort(sc, 0x14, 0xad20);
20713                 MP_WritePhyUshort(sc, 0x14, 0x0302);
20714                 MP_WritePhyUshort(sc, 0x14, 0x867d);
20715                 MP_WritePhyUshort(sc, 0x14, 0xad21);
20716                 MP_WritePhyUshort(sc, 0x14, 0x0302);
20717                 MP_WritePhyUshort(sc, 0x14, 0x85ca);
20718                 MP_WritePhyUshort(sc, 0x14, 0xad22);
20719                 MP_WritePhyUshort(sc, 0x14, 0x0302);
20720                 MP_WritePhyUshort(sc, 0x14, 0x1bce);
20721                 MP_WritePhyUshort(sc, 0x14, 0xaf18);
20722                 MP_WritePhyUshort(sc, 0x14, 0x11af);
20723                 MP_WritePhyUshort(sc, 0x14, 0x1811);
20724                 MP_WritePhyUshort(sc, 0x14, 0x0106);
20725                 MP_WritePhyUshort(sc, 0x14, 0xe081);
20726                 MP_WritePhyUshort(sc, 0x14, 0x48af);
20727                 MP_WritePhyUshort(sc, 0x14, 0x3b1f);
20728                 MP_WritePhyUshort(sc, 0x14, 0xf8f9);
20729                 MP_WritePhyUshort(sc, 0x14, 0xfaef);
20730                 MP_WritePhyUshort(sc, 0x14, 0x69ee);
20731                 MP_WritePhyUshort(sc, 0x14, 0x8010);
20732                 MP_WritePhyUshort(sc, 0x14, 0xf7d1);
20733                 MP_WritePhyUshort(sc, 0x14, 0x04bf);
20734                 MP_WritePhyUshort(sc, 0x14, 0x8776);
20735                 MP_WritePhyUshort(sc, 0x14, 0x0241);
20736                 MP_WritePhyUshort(sc, 0x14, 0x0a02);
20737                 MP_WritePhyUshort(sc, 0x14, 0x8704);
20738                 MP_WritePhyUshort(sc, 0x14, 0xbf87);
20739                 MP_WritePhyUshort(sc, 0x14, 0x4fd7);
20740                 MP_WritePhyUshort(sc, 0x14, 0xb822);
20741                 MP_WritePhyUshort(sc, 0x14, 0xd00c);
20742                 MP_WritePhyUshort(sc, 0x14, 0x0241);
20743                 MP_WritePhyUshort(sc, 0x14, 0x03ee);
20744                 MP_WritePhyUshort(sc, 0x14, 0x80cd);
20745                 MP_WritePhyUshort(sc, 0x14, 0xa0ee);
20746                 MP_WritePhyUshort(sc, 0x14, 0x80ce);
20747                 MP_WritePhyUshort(sc, 0x14, 0x8bee);
20748                 MP_WritePhyUshort(sc, 0x14, 0x80d1);
20749                 MP_WritePhyUshort(sc, 0x14, 0xf5ee);
20750                 MP_WritePhyUshort(sc, 0x14, 0x80d2);
20751                 MP_WritePhyUshort(sc, 0x14, 0xa9ee);
20752                 MP_WritePhyUshort(sc, 0x14, 0x80d3);
20753                 MP_WritePhyUshort(sc, 0x14, 0x0aee);
20754                 MP_WritePhyUshort(sc, 0x14, 0x80f0);
20755                 MP_WritePhyUshort(sc, 0x14, 0x10ee);
20756                 MP_WritePhyUshort(sc, 0x14, 0x80f3);
20757                 MP_WritePhyUshort(sc, 0x14, 0x8fee);
20758                 MP_WritePhyUshort(sc, 0x14, 0x8101);
20759                 MP_WritePhyUshort(sc, 0x14, 0x1eee);
20760                 MP_WritePhyUshort(sc, 0x14, 0x810b);
20761                 MP_WritePhyUshort(sc, 0x14, 0x4aee);
20762                 MP_WritePhyUshort(sc, 0x14, 0x810c);
20763                 MP_WritePhyUshort(sc, 0x14, 0x7cee);
20764                 MP_WritePhyUshort(sc, 0x14, 0x8112);
20765                 MP_WritePhyUshort(sc, 0x14, 0x7fd1);
20766                 MP_WritePhyUshort(sc, 0x14, 0x0002);
20767                 MP_WritePhyUshort(sc, 0x14, 0x10e3);
20768                 MP_WritePhyUshort(sc, 0x14, 0xee80);
20769                 MP_WritePhyUshort(sc, 0x14, 0x8892);
20770                 MP_WritePhyUshort(sc, 0x14, 0xee80);
20771                 MP_WritePhyUshort(sc, 0x14, 0x8922);
20772                 MP_WritePhyUshort(sc, 0x14, 0xee80);
20773                 MP_WritePhyUshort(sc, 0x14, 0x9a80);
20774                 MP_WritePhyUshort(sc, 0x14, 0xee80);
20775                 MP_WritePhyUshort(sc, 0x14, 0x9b22);
20776                 MP_WritePhyUshort(sc, 0x14, 0xee80);
20777                 MP_WritePhyUshort(sc, 0x14, 0x9ca7);
20778                 MP_WritePhyUshort(sc, 0x14, 0xee80);
20779                 MP_WritePhyUshort(sc, 0x14, 0xa010);
20780                 MP_WritePhyUshort(sc, 0x14, 0xee80);
20781                 MP_WritePhyUshort(sc, 0x14, 0xa5a7);
20782                 MP_WritePhyUshort(sc, 0x14, 0xd200);
20783                 MP_WritePhyUshort(sc, 0x14, 0x020e);
20784                 MP_WritePhyUshort(sc, 0x14, 0x4b02);
20785                 MP_WritePhyUshort(sc, 0x14, 0x85c1);
20786                 MP_WritePhyUshort(sc, 0x14, 0xef96);
20787                 MP_WritePhyUshort(sc, 0x14, 0xfefd);
20788                 MP_WritePhyUshort(sc, 0x14, 0xfc04);
20789                 MP_WritePhyUshort(sc, 0x14, 0x0284);
20790                 MP_WritePhyUshort(sc, 0x14, 0x7b02);
20791                 MP_WritePhyUshort(sc, 0x14, 0x84b4);
20792                 MP_WritePhyUshort(sc, 0x14, 0x020c);
20793                 MP_WritePhyUshort(sc, 0x14, 0x9202);
20794                 MP_WritePhyUshort(sc, 0x14, 0x0cab);
20795                 MP_WritePhyUshort(sc, 0x14, 0x020c);
20796                 MP_WritePhyUshort(sc, 0x14, 0xd602);
20797                 MP_WritePhyUshort(sc, 0x14, 0x0cef);
20798                 MP_WritePhyUshort(sc, 0x14, 0x020d);
20799                 MP_WritePhyUshort(sc, 0x14, 0x1a02);
20800                 MP_WritePhyUshort(sc, 0x14, 0x0c24);
20801                 MP_WritePhyUshort(sc, 0x14, 0x04f8);
20802                 MP_WritePhyUshort(sc, 0x14, 0xfaef);
20803                 MP_WritePhyUshort(sc, 0x14, 0x69e1);
20804                 MP_WritePhyUshort(sc, 0x14, 0x8234);
20805                 MP_WritePhyUshort(sc, 0x14, 0xac29);
20806                 MP_WritePhyUshort(sc, 0x14, 0x1ae0);
20807                 MP_WritePhyUshort(sc, 0x14, 0x8229);
20808                 MP_WritePhyUshort(sc, 0x14, 0xac21);
20809                 MP_WritePhyUshort(sc, 0x14, 0x02ae);
20810                 MP_WritePhyUshort(sc, 0x14, 0x2202);
20811                 MP_WritePhyUshort(sc, 0x14, 0x1085);
20812                 MP_WritePhyUshort(sc, 0x14, 0xf621);
20813                 MP_WritePhyUshort(sc, 0x14, 0xe482);
20814                 MP_WritePhyUshort(sc, 0x14, 0x29d1);
20815                 MP_WritePhyUshort(sc, 0x14, 0x01bf);
20816                 MP_WritePhyUshort(sc, 0x14, 0x4364);
20817                 MP_WritePhyUshort(sc, 0x14, 0x0241);
20818                 MP_WritePhyUshort(sc, 0x14, 0x0aae);
20819                 MP_WritePhyUshort(sc, 0x14, 0x1002);
20820                 MP_WritePhyUshort(sc, 0x14, 0x127a);
20821                 MP_WritePhyUshort(sc, 0x14, 0xf629);
20822                 MP_WritePhyUshort(sc, 0x14, 0xe582);
20823                 MP_WritePhyUshort(sc, 0x14, 0x34e0);
20824                 MP_WritePhyUshort(sc, 0x14, 0x8229);
20825                 MP_WritePhyUshort(sc, 0x14, 0xf621);
20826                 MP_WritePhyUshort(sc, 0x14, 0xe482);
20827                 MP_WritePhyUshort(sc, 0x14, 0x29ef);
20828                 MP_WritePhyUshort(sc, 0x14, 0x96fe);
20829                 MP_WritePhyUshort(sc, 0x14, 0xfc04);
20830                 MP_WritePhyUshort(sc, 0x14, 0xf8e1);
20831                 MP_WritePhyUshort(sc, 0x14, 0x8234);
20832                 MP_WritePhyUshort(sc, 0x14, 0xac2a);
20833                 MP_WritePhyUshort(sc, 0x14, 0x18e0);
20834                 MP_WritePhyUshort(sc, 0x14, 0x8229);
20835                 MP_WritePhyUshort(sc, 0x14, 0xac22);
20836                 MP_WritePhyUshort(sc, 0x14, 0x02ae);
20837                 MP_WritePhyUshort(sc, 0x14, 0x2602);
20838                 MP_WritePhyUshort(sc, 0x14, 0x84f9);
20839                 MP_WritePhyUshort(sc, 0x14, 0x0285);
20840                 MP_WritePhyUshort(sc, 0x14, 0x66d1);
20841                 MP_WritePhyUshort(sc, 0x14, 0x01bf);
20842                 MP_WritePhyUshort(sc, 0x14, 0x4367);
20843                 MP_WritePhyUshort(sc, 0x14, 0x0241);
20844                 MP_WritePhyUshort(sc, 0x14, 0x0aae);
20845                 MP_WritePhyUshort(sc, 0x14, 0x0e02);
20846                 MP_WritePhyUshort(sc, 0x14, 0x84eb);
20847                 MP_WritePhyUshort(sc, 0x14, 0x0285);
20848                 MP_WritePhyUshort(sc, 0x14, 0xaae1);
20849                 MP_WritePhyUshort(sc, 0x14, 0x8234);
20850                 MP_WritePhyUshort(sc, 0x14, 0xf62a);
20851                 MP_WritePhyUshort(sc, 0x14, 0xe582);
20852                 MP_WritePhyUshort(sc, 0x14, 0x34e0);
20853                 MP_WritePhyUshort(sc, 0x14, 0x8229);
20854                 MP_WritePhyUshort(sc, 0x14, 0xf622);
20855                 MP_WritePhyUshort(sc, 0x14, 0xe482);
20856                 MP_WritePhyUshort(sc, 0x14, 0x29fc);
20857                 MP_WritePhyUshort(sc, 0x14, 0x04f9);
20858                 MP_WritePhyUshort(sc, 0x14, 0xe280);
20859                 MP_WritePhyUshort(sc, 0x14, 0x11ad);
20860                 MP_WritePhyUshort(sc, 0x14, 0x3105);
20861                 MP_WritePhyUshort(sc, 0x14, 0xd200);
20862                 MP_WritePhyUshort(sc, 0x14, 0x020e);
20863                 MP_WritePhyUshort(sc, 0x14, 0x4bfd);
20864                 MP_WritePhyUshort(sc, 0x14, 0x04f8);
20865                 MP_WritePhyUshort(sc, 0x14, 0xf9fa);
20866                 MP_WritePhyUshort(sc, 0x14, 0xef69);
20867                 MP_WritePhyUshort(sc, 0x14, 0xe080);
20868                 MP_WritePhyUshort(sc, 0x14, 0x11ad);
20869                 MP_WritePhyUshort(sc, 0x14, 0x215c);
20870                 MP_WritePhyUshort(sc, 0x14, 0xbf42);
20871                 MP_WritePhyUshort(sc, 0x14, 0x5002);
20872                 MP_WritePhyUshort(sc, 0x14, 0x4148);
20873                 MP_WritePhyUshort(sc, 0x14, 0xac28);
20874                 MP_WritePhyUshort(sc, 0x14, 0x1bbf);
20875                 MP_WritePhyUshort(sc, 0x14, 0x4253);
20876                 MP_WritePhyUshort(sc, 0x14, 0x0241);
20877                 MP_WritePhyUshort(sc, 0x14, 0x48ac);
20878                 MP_WritePhyUshort(sc, 0x14, 0x2812);
20879                 MP_WritePhyUshort(sc, 0x14, 0xbf42);
20880                 MP_WritePhyUshort(sc, 0x14, 0x5902);
20881                 MP_WritePhyUshort(sc, 0x14, 0x4148);
20882                 MP_WritePhyUshort(sc, 0x14, 0xac28);
20883                 MP_WritePhyUshort(sc, 0x14, 0x04d3);
20884                 MP_WritePhyUshort(sc, 0x14, 0x00ae);
20885                 MP_WritePhyUshort(sc, 0x14, 0x07d3);
20886                 MP_WritePhyUshort(sc, 0x14, 0x06af);
20887                 MP_WritePhyUshort(sc, 0x14, 0x8557);
20888                 MP_WritePhyUshort(sc, 0x14, 0xd303);
20889                 MP_WritePhyUshort(sc, 0x14, 0xe080);
20890                 MP_WritePhyUshort(sc, 0x14, 0x11ad);
20891                 MP_WritePhyUshort(sc, 0x14, 0x2625);
20892                 MP_WritePhyUshort(sc, 0x14, 0xbf43);
20893                 MP_WritePhyUshort(sc, 0x14, 0xeb02);
20894                 MP_WritePhyUshort(sc, 0x14, 0x4148);
20895                 MP_WritePhyUshort(sc, 0x14, 0xe280);
20896                 MP_WritePhyUshort(sc, 0x14, 0x730d);
20897                 MP_WritePhyUshort(sc, 0x14, 0x21f6);
20898                 MP_WritePhyUshort(sc, 0x14, 0x370d);
20899                 MP_WritePhyUshort(sc, 0x14, 0x11f6);
20900                 MP_WritePhyUshort(sc, 0x14, 0x2f1b);
20901                 MP_WritePhyUshort(sc, 0x14, 0x21aa);
20902                 MP_WritePhyUshort(sc, 0x14, 0x02ae);
20903                 MP_WritePhyUshort(sc, 0x14, 0x10e2);
20904                 MP_WritePhyUshort(sc, 0x14, 0x8074);
20905                 MP_WritePhyUshort(sc, 0x14, 0x0d21);
20906                 MP_WritePhyUshort(sc, 0x14, 0xf637);
20907                 MP_WritePhyUshort(sc, 0x14, 0x1b21);
20908                 MP_WritePhyUshort(sc, 0x14, 0xaa03);
20909                 MP_WritePhyUshort(sc, 0x14, 0x13ae);
20910                 MP_WritePhyUshort(sc, 0x14, 0x022b);
20911                 MP_WritePhyUshort(sc, 0x14, 0x0202);
20912                 MP_WritePhyUshort(sc, 0x14, 0x0e36);
20913                 MP_WritePhyUshort(sc, 0x14, 0x020e);
20914                 MP_WritePhyUshort(sc, 0x14, 0x4b02);
20915                 MP_WritePhyUshort(sc, 0x14, 0x0f91);
20916                 MP_WritePhyUshort(sc, 0x14, 0xef96);
20917                 MP_WritePhyUshort(sc, 0x14, 0xfefd);
20918                 MP_WritePhyUshort(sc, 0x14, 0xfc04);
20919                 MP_WritePhyUshort(sc, 0x14, 0xf8f9);
20920                 MP_WritePhyUshort(sc, 0x14, 0xfaef);
20921                 MP_WritePhyUshort(sc, 0x14, 0x69e0);
20922                 MP_WritePhyUshort(sc, 0x14, 0x8012);
20923                 MP_WritePhyUshort(sc, 0x14, 0xad27);
20924                 MP_WritePhyUshort(sc, 0x14, 0x33bf);
20925                 MP_WritePhyUshort(sc, 0x14, 0x4250);
20926                 MP_WritePhyUshort(sc, 0x14, 0x0241);
20927                 MP_WritePhyUshort(sc, 0x14, 0x48ac);
20928                 MP_WritePhyUshort(sc, 0x14, 0x2809);
20929                 MP_WritePhyUshort(sc, 0x14, 0xbf42);
20930                 MP_WritePhyUshort(sc, 0x14, 0x5302);
20931                 MP_WritePhyUshort(sc, 0x14, 0x4148);
20932                 MP_WritePhyUshort(sc, 0x14, 0xad28);
20933                 MP_WritePhyUshort(sc, 0x14, 0x21bf);
20934                 MP_WritePhyUshort(sc, 0x14, 0x43eb);
20935                 MP_WritePhyUshort(sc, 0x14, 0x0241);
20936                 MP_WritePhyUshort(sc, 0x14, 0x48e3);
20937                 MP_WritePhyUshort(sc, 0x14, 0x87ff);
20938                 MP_WritePhyUshort(sc, 0x14, 0xd200);
20939                 MP_WritePhyUshort(sc, 0x14, 0x1b45);
20940                 MP_WritePhyUshort(sc, 0x14, 0xac27);
20941                 MP_WritePhyUshort(sc, 0x14, 0x11e1);
20942                 MP_WritePhyUshort(sc, 0x14, 0x87fe);
20943                 MP_WritePhyUshort(sc, 0x14, 0xbf87);
20944                 MP_WritePhyUshort(sc, 0x14, 0x6702);
20945                 MP_WritePhyUshort(sc, 0x14, 0x410a);
20946                 MP_WritePhyUshort(sc, 0x14, 0x0d11);
20947                 MP_WritePhyUshort(sc, 0x14, 0xbf87);
20948                 MP_WritePhyUshort(sc, 0x14, 0x6a02);
20949                 MP_WritePhyUshort(sc, 0x14, 0x410a);
20950                 MP_WritePhyUshort(sc, 0x14, 0xef96);
20951                 MP_WritePhyUshort(sc, 0x14, 0xfefd);
20952                 MP_WritePhyUshort(sc, 0x14, 0xfc04);
20953                 MP_WritePhyUshort(sc, 0x14, 0xf8fa);
20954                 MP_WritePhyUshort(sc, 0x14, 0xef69);
20955                 MP_WritePhyUshort(sc, 0x14, 0xd100);
20956                 MP_WritePhyUshort(sc, 0x14, 0xbf87);
20957                 MP_WritePhyUshort(sc, 0x14, 0x6702);
20958                 MP_WritePhyUshort(sc, 0x14, 0x410a);
20959                 MP_WritePhyUshort(sc, 0x14, 0xbf87);
20960                 MP_WritePhyUshort(sc, 0x14, 0x6a02);
20961                 MP_WritePhyUshort(sc, 0x14, 0x410a);
20962                 MP_WritePhyUshort(sc, 0x14, 0xef96);
20963                 MP_WritePhyUshort(sc, 0x14, 0xfefc);
20964                 MP_WritePhyUshort(sc, 0x14, 0x04ee);
20965                 MP_WritePhyUshort(sc, 0x14, 0x87ff);
20966                 MP_WritePhyUshort(sc, 0x14, 0x46ee);
20967                 MP_WritePhyUshort(sc, 0x14, 0x87fe);
20968                 MP_WritePhyUshort(sc, 0x14, 0x0104);
20969                 MP_WritePhyUshort(sc, 0x14, 0xf8fa);
20970                 MP_WritePhyUshort(sc, 0x14, 0xef69);
20971                 MP_WritePhyUshort(sc, 0x14, 0xe082);
20972                 MP_WritePhyUshort(sc, 0x14, 0x46a0);
20973                 MP_WritePhyUshort(sc, 0x14, 0x0005);
20974                 MP_WritePhyUshort(sc, 0x14, 0x0285);
20975                 MP_WritePhyUshort(sc, 0x14, 0xecae);
20976                 MP_WritePhyUshort(sc, 0x14, 0x0ea0);
20977                 MP_WritePhyUshort(sc, 0x14, 0x0105);
20978                 MP_WritePhyUshort(sc, 0x14, 0x021a);
20979                 MP_WritePhyUshort(sc, 0x14, 0x68ae);
20980                 MP_WritePhyUshort(sc, 0x14, 0x06a0);
20981                 MP_WritePhyUshort(sc, 0x14, 0x0203);
20982                 MP_WritePhyUshort(sc, 0x14, 0x021a);
20983                 MP_WritePhyUshort(sc, 0x14, 0xf4ef);
20984                 MP_WritePhyUshort(sc, 0x14, 0x96fe);
20985                 MP_WritePhyUshort(sc, 0x14, 0xfc04);
20986                 MP_WritePhyUshort(sc, 0x14, 0xf8f9);
20987                 MP_WritePhyUshort(sc, 0x14, 0xfaef);
20988                 MP_WritePhyUshort(sc, 0x14, 0x69e0);
20989                 MP_WritePhyUshort(sc, 0x14, 0x822e);
20990                 MP_WritePhyUshort(sc, 0x14, 0xf621);
20991                 MP_WritePhyUshort(sc, 0x14, 0xe482);
20992                 MP_WritePhyUshort(sc, 0x14, 0x2ee0);
20993                 MP_WritePhyUshort(sc, 0x14, 0x8010);
20994                 MP_WritePhyUshort(sc, 0x14, 0xac22);
20995                 MP_WritePhyUshort(sc, 0x14, 0x02ae);
20996                 MP_WritePhyUshort(sc, 0x14, 0x76e0);
20997                 MP_WritePhyUshort(sc, 0x14, 0x822c);
20998                 MP_WritePhyUshort(sc, 0x14, 0xf721);
20999                 MP_WritePhyUshort(sc, 0x14, 0xe482);
21000                 MP_WritePhyUshort(sc, 0x14, 0x2cbf);
21001                 MP_WritePhyUshort(sc, 0x14, 0x41a5);
21002                 MP_WritePhyUshort(sc, 0x14, 0x0241);
21003                 MP_WritePhyUshort(sc, 0x14, 0x48ef);
21004                 MP_WritePhyUshort(sc, 0x14, 0x21bf);
21005                 MP_WritePhyUshort(sc, 0x14, 0x41a8);
21006                 MP_WritePhyUshort(sc, 0x14, 0x0241);
21007                 MP_WritePhyUshort(sc, 0x14, 0x480c);
21008                 MP_WritePhyUshort(sc, 0x14, 0x111e);
21009                 MP_WritePhyUshort(sc, 0x14, 0x21bf);
21010                 MP_WritePhyUshort(sc, 0x14, 0x41ab);
21011                 MP_WritePhyUshort(sc, 0x14, 0x0241);
21012                 MP_WritePhyUshort(sc, 0x14, 0x480c);
21013                 MP_WritePhyUshort(sc, 0x14, 0x121e);
21014                 MP_WritePhyUshort(sc, 0x14, 0x21e6);
21015                 MP_WritePhyUshort(sc, 0x14, 0x8248);
21016                 MP_WritePhyUshort(sc, 0x14, 0xa200);
21017                 MP_WritePhyUshort(sc, 0x14, 0x0ae1);
21018                 MP_WritePhyUshort(sc, 0x14, 0x822c);
21019                 MP_WritePhyUshort(sc, 0x14, 0xf629);
21020                 MP_WritePhyUshort(sc, 0x14, 0xe582);
21021                 MP_WritePhyUshort(sc, 0x14, 0x2cae);
21022                 MP_WritePhyUshort(sc, 0x14, 0x42e0);
21023                 MP_WritePhyUshort(sc, 0x14, 0x8249);
21024                 MP_WritePhyUshort(sc, 0x14, 0xf721);
21025                 MP_WritePhyUshort(sc, 0x14, 0xe482);
21026                 MP_WritePhyUshort(sc, 0x14, 0x4902);
21027                 MP_WritePhyUshort(sc, 0x14, 0x4520);
21028                 MP_WritePhyUshort(sc, 0x14, 0xbf41);
21029                 MP_WritePhyUshort(sc, 0x14, 0xb702);
21030                 MP_WritePhyUshort(sc, 0x14, 0x4148);
21031                 MP_WritePhyUshort(sc, 0x14, 0xef21);
21032                 MP_WritePhyUshort(sc, 0x14, 0xbf41);
21033                 MP_WritePhyUshort(sc, 0x14, 0xae02);
21034                 MP_WritePhyUshort(sc, 0x14, 0x4148);
21035                 MP_WritePhyUshort(sc, 0x14, 0x0c12);
21036                 MP_WritePhyUshort(sc, 0x14, 0x1e21);
21037                 MP_WritePhyUshort(sc, 0x14, 0xbf41);
21038                 MP_WritePhyUshort(sc, 0x14, 0xb102);
21039                 MP_WritePhyUshort(sc, 0x14, 0x4148);
21040                 MP_WritePhyUshort(sc, 0x14, 0x0c13);
21041                 MP_WritePhyUshort(sc, 0x14, 0x1e21);
21042                 MP_WritePhyUshort(sc, 0x14, 0xbf41);
21043                 MP_WritePhyUshort(sc, 0x14, 0xba02);
21044                 MP_WritePhyUshort(sc, 0x14, 0x4148);
21045                 MP_WritePhyUshort(sc, 0x14, 0x0c14);
21046                 MP_WritePhyUshort(sc, 0x14, 0x1e21);
21047                 MP_WritePhyUshort(sc, 0x14, 0xbf43);
21048                 MP_WritePhyUshort(sc, 0x14, 0x4602);
21049                 MP_WritePhyUshort(sc, 0x14, 0x4148);
21050                 MP_WritePhyUshort(sc, 0x14, 0x0c16);
21051                 MP_WritePhyUshort(sc, 0x14, 0x1e21);
21052                 MP_WritePhyUshort(sc, 0x14, 0xe682);
21053                 MP_WritePhyUshort(sc, 0x14, 0x47ee);
21054                 MP_WritePhyUshort(sc, 0x14, 0x8246);
21055                 MP_WritePhyUshort(sc, 0x14, 0x01ef);
21056                 MP_WritePhyUshort(sc, 0x14, 0x96fe);
21057                 MP_WritePhyUshort(sc, 0x14, 0xfdfc);
21058                 MP_WritePhyUshort(sc, 0x14, 0x04f8);
21059                 MP_WritePhyUshort(sc, 0x14, 0xfaef);
21060                 MP_WritePhyUshort(sc, 0x14, 0x69e0);
21061                 MP_WritePhyUshort(sc, 0x14, 0x824b);
21062                 MP_WritePhyUshort(sc, 0x14, 0xa000);
21063                 MP_WritePhyUshort(sc, 0x14, 0x0502);
21064                 MP_WritePhyUshort(sc, 0x14, 0x8697);
21065                 MP_WritePhyUshort(sc, 0x14, 0xae06);
21066                 MP_WritePhyUshort(sc, 0x14, 0xa001);
21067                 MP_WritePhyUshort(sc, 0x14, 0x0302);
21068                 MP_WritePhyUshort(sc, 0x14, 0x1937);
21069                 MP_WritePhyUshort(sc, 0x14, 0xef96);
21070                 MP_WritePhyUshort(sc, 0x14, 0xfefc);
21071                 MP_WritePhyUshort(sc, 0x14, 0x04f8);
21072                 MP_WritePhyUshort(sc, 0x14, 0xfaef);
21073                 MP_WritePhyUshort(sc, 0x14, 0x69e0);
21074                 MP_WritePhyUshort(sc, 0x14, 0x822e);
21075                 MP_WritePhyUshort(sc, 0x14, 0xf620);
21076                 MP_WritePhyUshort(sc, 0x14, 0xe482);
21077                 MP_WritePhyUshort(sc, 0x14, 0x2ee0);
21078                 MP_WritePhyUshort(sc, 0x14, 0x8010);
21079                 MP_WritePhyUshort(sc, 0x14, 0xac21);
21080                 MP_WritePhyUshort(sc, 0x14, 0x02ae);
21081                 MP_WritePhyUshort(sc, 0x14, 0x54e0);
21082                 MP_WritePhyUshort(sc, 0x14, 0x822c);
21083                 MP_WritePhyUshort(sc, 0x14, 0xf720);
21084                 MP_WritePhyUshort(sc, 0x14, 0xe482);
21085                 MP_WritePhyUshort(sc, 0x14, 0x2cbf);
21086                 MP_WritePhyUshort(sc, 0x14, 0x4175);
21087                 MP_WritePhyUshort(sc, 0x14, 0x0241);
21088                 MP_WritePhyUshort(sc, 0x14, 0x48ac);
21089                 MP_WritePhyUshort(sc, 0x14, 0x2822);
21090                 MP_WritePhyUshort(sc, 0x14, 0xbf41);
21091                 MP_WritePhyUshort(sc, 0x14, 0x9f02);
21092                 MP_WritePhyUshort(sc, 0x14, 0x4148);
21093                 MP_WritePhyUshort(sc, 0x14, 0xe582);
21094                 MP_WritePhyUshort(sc, 0x14, 0x4cac);
21095                 MP_WritePhyUshort(sc, 0x14, 0x2820);
21096                 MP_WritePhyUshort(sc, 0x14, 0xd103);
21097                 MP_WritePhyUshort(sc, 0x14, 0xbf41);
21098                 MP_WritePhyUshort(sc, 0x14, 0x9902);
21099                 MP_WritePhyUshort(sc, 0x14, 0x410a);
21100                 MP_WritePhyUshort(sc, 0x14, 0xee82);
21101                 MP_WritePhyUshort(sc, 0x14, 0x4b00);
21102                 MP_WritePhyUshort(sc, 0x14, 0xe182);
21103                 MP_WritePhyUshort(sc, 0x14, 0x2cf6);
21104                 MP_WritePhyUshort(sc, 0x14, 0x28e5);
21105                 MP_WritePhyUshort(sc, 0x14, 0x822c);
21106                 MP_WritePhyUshort(sc, 0x14, 0xae21);
21107                 MP_WritePhyUshort(sc, 0x14, 0xd104);
21108                 MP_WritePhyUshort(sc, 0x14, 0xbf41);
21109                 MP_WritePhyUshort(sc, 0x14, 0x9902);
21110                 MP_WritePhyUshort(sc, 0x14, 0x410a);
21111                 MP_WritePhyUshort(sc, 0x14, 0xae08);
21112                 MP_WritePhyUshort(sc, 0x14, 0xd105);
21113                 MP_WritePhyUshort(sc, 0x14, 0xbf41);
21114                 MP_WritePhyUshort(sc, 0x14, 0x9902);
21115                 MP_WritePhyUshort(sc, 0x14, 0x410a);
21116                 MP_WritePhyUshort(sc, 0x14, 0xe082);
21117                 MP_WritePhyUshort(sc, 0x14, 0x49f7);
21118                 MP_WritePhyUshort(sc, 0x14, 0x20e4);
21119                 MP_WritePhyUshort(sc, 0x14, 0x8249);
21120                 MP_WritePhyUshort(sc, 0x14, 0x0245);
21121                 MP_WritePhyUshort(sc, 0x14, 0x20ee);
21122                 MP_WritePhyUshort(sc, 0x14, 0x824b);
21123                 MP_WritePhyUshort(sc, 0x14, 0x01ef);
21124                 MP_WritePhyUshort(sc, 0x14, 0x96fe);
21125                 MP_WritePhyUshort(sc, 0x14, 0xfc04);
21126                 MP_WritePhyUshort(sc, 0x14, 0xf8f9);
21127                 MP_WritePhyUshort(sc, 0x14, 0xface);
21128                 MP_WritePhyUshort(sc, 0x14, 0xfaef);
21129                 MP_WritePhyUshort(sc, 0x14, 0x69fb);
21130                 MP_WritePhyUshort(sc, 0x14, 0xbf87);
21131                 MP_WritePhyUshort(sc, 0x14, 0x2fd7);
21132                 MP_WritePhyUshort(sc, 0x14, 0x0020);
21133                 MP_WritePhyUshort(sc, 0x14, 0xd819);
21134                 MP_WritePhyUshort(sc, 0x14, 0xd919);
21135                 MP_WritePhyUshort(sc, 0x14, 0xda19);
21136                 MP_WritePhyUshort(sc, 0x14, 0xdb19);
21137                 MP_WritePhyUshort(sc, 0x14, 0x07ef);
21138                 MP_WritePhyUshort(sc, 0x14, 0x9502);
21139                 MP_WritePhyUshort(sc, 0x14, 0x410a);
21140                 MP_WritePhyUshort(sc, 0x14, 0x073f);
21141                 MP_WritePhyUshort(sc, 0x14, 0x0004);
21142                 MP_WritePhyUshort(sc, 0x14, 0x9fec);
21143                 MP_WritePhyUshort(sc, 0x14, 0xffef);
21144                 MP_WritePhyUshort(sc, 0x14, 0x96fe);
21145                 MP_WritePhyUshort(sc, 0x14, 0xc6fe);
21146                 MP_WritePhyUshort(sc, 0x14, 0xfdfc);
21147                 MP_WritePhyUshort(sc, 0x14, 0x0400);
21148                 MP_WritePhyUshort(sc, 0x14, 0x0144);
21149                 MP_WritePhyUshort(sc, 0x14, 0x0000);
21150                 MP_WritePhyUshort(sc, 0x14, 0x0343);
21151                 MP_WritePhyUshort(sc, 0x14, 0xee00);
21152                 MP_WritePhyUshort(sc, 0x14, 0x0087);
21153                 MP_WritePhyUshort(sc, 0x14, 0x5b00);
21154                 MP_WritePhyUshort(sc, 0x14, 0x0141);
21155                 MP_WritePhyUshort(sc, 0x14, 0xe100);
21156                 MP_WritePhyUshort(sc, 0x14, 0x0387);
21157                 MP_WritePhyUshort(sc, 0x14, 0x5e00);
21158                 MP_WritePhyUshort(sc, 0x14, 0x0987);
21159                 MP_WritePhyUshort(sc, 0x14, 0x6100);
21160                 MP_WritePhyUshort(sc, 0x14, 0x0987);
21161                 MP_WritePhyUshort(sc, 0x14, 0x6400);
21162                 MP_WritePhyUshort(sc, 0x14, 0x0087);
21163                 MP_WritePhyUshort(sc, 0x14, 0x6da4);
21164                 MP_WritePhyUshort(sc, 0x14, 0x00b8);
21165                 MP_WritePhyUshort(sc, 0x14, 0x20c4);
21166                 MP_WritePhyUshort(sc, 0x14, 0x1600);
21167                 MP_WritePhyUshort(sc, 0x14, 0x000f);
21168                 MP_WritePhyUshort(sc, 0x14, 0xf800);
21169                 MP_WritePhyUshort(sc, 0x14, 0x7000);
21170                 MP_WritePhyUshort(sc, 0x14, 0xb82e);
21171                 MP_WritePhyUshort(sc, 0x14, 0x98a5);
21172                 MP_WritePhyUshort(sc, 0x14, 0x8ab6);
21173                 MP_WritePhyUshort(sc, 0x14, 0xa83e);
21174                 MP_WritePhyUshort(sc, 0x14, 0x50a8);
21175                 MP_WritePhyUshort(sc, 0x14, 0x3e33);
21176                 MP_WritePhyUshort(sc, 0x14, 0xbcc6);
21177                 MP_WritePhyUshort(sc, 0x14, 0x22bc);
21178                 MP_WritePhyUshort(sc, 0x14, 0xc6aa);
21179                 MP_WritePhyUshort(sc, 0x14, 0xa442);
21180                 MP_WritePhyUshort(sc, 0x14, 0xffc4);
21181                 MP_WritePhyUshort(sc, 0x14, 0x0800);
21182                 MP_WritePhyUshort(sc, 0x14, 0xc416);
21183                 MP_WritePhyUshort(sc, 0x14, 0xa8bc);
21184                 MP_WritePhyUshort(sc, 0x14, 0xc000);
21185                 MP_WritePhyUshort(sc, 0x13, 0xb818);
21186                 MP_WritePhyUshort(sc, 0x14, 0x02e3);
21187                 MP_WritePhyUshort(sc, 0x13, 0xb81a);
21188                 MP_WritePhyUshort(sc, 0x14, 0x17ff);
21189                 MP_WritePhyUshort(sc, 0x13, 0xb81e);
21190                 MP_WritePhyUshort(sc, 0x14, 0x3b1c);
21191                 MP_WritePhyUshort(sc, 0x13, 0xb820);
21192                 MP_WritePhyUshort(sc, 0x14, 0x021b);
21193                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21194
21195                 MP_WritePhyUshort(sc,0x1F, 0x0A43);
21196                 MP_WritePhyUshort(sc,0x13, 0x0000);
21197                 MP_WritePhyUshort(sc,0x14, 0x0000);
21198                 MP_WritePhyUshort(sc,0x1f, 0x0B82);
21199                 PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
21200                 PhyRegValue &= ~(BIT_0);
21201                 MP_WritePhyUshort(sc,0x17, PhyRegValue);
21202                 MP_WritePhyUshort(sc,0x1f, 0x0A43);
21203                 MP_WritePhyUshort(sc,0x13, 0x8146);
21204                 MP_WritePhyUshort(sc,0x14, 0x0000);
21205
21206                 MP_WritePhyUshort(sc,0x1f, 0x0B82);
21207                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
21208                 PhyRegValue &= ~(BIT_4);
21209                 MP_WritePhyUshort(sc,0x10, PhyRegValue);
21210
21211                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
21212                 SetEthPhyBit(sc, 0x11, (BIT_3 | BIT_2));
21213                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21214
21215
21216                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
21217                 ClearEthPhyBit(sc, 0x14, BIT_8);
21218                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
21219                 SetEthPhyBit(sc, 0x11, BIT_7);
21220                 SetEthPhyBit(sc, 0x11, BIT_6);
21221                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21222                 MP_WritePhyUshort(sc, 0x13, 0x8084);
21223                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
21224                 SetEthPhyBit(sc, 0x10, BIT_12);
21225                 SetEthPhyBit(sc, 0x10, BIT_1);
21226                 SetEthPhyBit(sc, 0x10, BIT_0);
21227                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21228
21229                 MP_WritePhyUshort(sc, 0x1F, 0x0A4B);
21230                 SetEthPhyBit(sc, 0x11, BIT_2);
21231                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21232
21233                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21234                 MP_WritePhyUshort(sc, 0x13, 0x8012);
21235                 SetEthPhyBit(sc, 0x14, BIT_15);
21236                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21237
21238                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
21239                 ClearAndSetEthPhyBit(sc,
21240                                      0x11,
21241                                      BIT_13 ,
21242                                      BIT_14
21243                                     );
21244                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21245
21246                 if (phy_power_saving == 1) {
21247                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21248                         SetEthPhyBit(sc, 0x10, BIT_2);
21249                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
21250                 } else {
21251                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21252                         ClearEthPhyBit(sc, 0x10, BIT_2);
21253                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
21254                         DELAY(20000);
21255                 }
21256
21257                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21258                 MP_WritePhyUshort(sc, 0x13, 0x8011);
21259                 ClearEthPhyBit(sc, 0x14, BIT_14);
21260                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
21261                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21262                 MP_WritePhyUshort(sc, 0x00, 0x9200);
21263         } else if (sc->re_type == MACFG_62 || sc->re_type == MACFG_67) {
21264                 MP_WritePhyUshort(sc, 0x1F, 0x0BCC);
21265                 ClearEthPhyBit(sc, 0x14, BIT_8);
21266                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
21267                 SetEthPhyBit(sc, 0x11, BIT_7);
21268                 SetEthPhyBit(sc, 0x11, BIT_6);
21269                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21270                 MP_WritePhyUshort(sc, 0x13, 0x8084);
21271                 ClearEthPhyBit(sc, 0x14, (BIT_14 | BIT_13));
21272                 SetEthPhyBit(sc, 0x10, BIT_12);
21273                 SetEthPhyBit(sc, 0x10, BIT_1);
21274                 SetEthPhyBit(sc, 0x10, BIT_0);
21275                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21276
21277                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21278                 MP_WritePhyUshort(sc, 0x13, 0x8012);
21279                 SetEthPhyBit(sc, 0x14, BIT_15);
21280                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21281
21282                 MP_WritePhyUshort(sc, 0x1F, 0x0C42);
21283                 ClearAndSetEthPhyBit(sc,
21284                                      0x11,
21285                                      BIT_13 ,
21286                                      BIT_14
21287                                     );
21288                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21289
21290                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21291                 MP_WritePhyUshort(sc, 0x13, 0x80F3);
21292                 ClearAndSetEthPhyBit(sc,
21293                                      0x14,
21294                                      0xFF00 ,
21295                                      0x8B00
21296                                     );
21297                 MP_WritePhyUshort(sc, 0x13, 0x80F0);
21298                 ClearAndSetEthPhyBit(sc,
21299                                      0x14,
21300                                      0xFF00 ,
21301                                      0x3A00
21302                                     );
21303                 MP_WritePhyUshort(sc, 0x13, 0x80EF);
21304                 ClearAndSetEthPhyBit(sc,
21305                                      0x14,
21306                                      0xFF00 ,
21307                                      0x0500
21308                                     );
21309                 MP_WritePhyUshort(sc, 0x13, 0x80F6);
21310                 ClearAndSetEthPhyBit(sc,
21311                                      0x14,
21312                                      0xFF00 ,
21313                                      0x6E00
21314                                     );
21315                 MP_WritePhyUshort(sc, 0x13, 0x80EC);
21316                 ClearAndSetEthPhyBit(sc,
21317                                      0x14,
21318                                      0xFF00 ,
21319                                      0x6800
21320                                     );
21321                 MP_WritePhyUshort(sc, 0x13, 0x80ED);
21322                 ClearAndSetEthPhyBit(sc,
21323                                      0x14,
21324                                      0xFF00 ,
21325                                      0x7C00
21326                                     );
21327                 MP_WritePhyUshort(sc, 0x13, 0x80F2);
21328                 ClearAndSetEthPhyBit(sc,
21329                                      0x14,
21330                                      0xFF00 ,
21331                                      0xF400
21332                                     );
21333                 MP_WritePhyUshort(sc, 0x13, 0x80F4);
21334                 ClearAndSetEthPhyBit(sc,
21335                                      0x14,
21336                                      0xFF00 ,
21337                                      0x8500
21338                                     );
21339
21340                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21341                 MP_WritePhyUshort(sc, 0x13, 0x8110);
21342                 ClearAndSetEthPhyBit(sc,
21343                                      0x14,
21344                                      0xFF00 ,
21345                                      0xA800
21346                                     );
21347                 MP_WritePhyUshort(sc, 0x13, 0x810F);
21348                 ClearAndSetEthPhyBit(sc,
21349                                      0x14,
21350                                      0xFF00 ,
21351                                      0x1D00
21352                                     );
21353                 MP_WritePhyUshort(sc, 0x13, 0x8111);
21354                 ClearAndSetEthPhyBit(sc,
21355                                      0x14,
21356                                      0xFF00 ,
21357                                      0xF500
21358                                     );
21359                 MP_WritePhyUshort(sc, 0x13, 0x8113);
21360                 ClearAndSetEthPhyBit(sc,
21361                                      0x14,
21362                                      0xFF00 ,
21363                                      0x6100
21364                                     );
21365                 MP_WritePhyUshort(sc, 0x13, 0x8115);
21366                 ClearAndSetEthPhyBit(sc,
21367                                      0x14,
21368                                      0xFF00 ,
21369                                      0x9200
21370                                     );
21371                 MP_WritePhyUshort(sc, 0x13, 0x810E);
21372                 ClearAndSetEthPhyBit(sc,
21373                                      0x14,
21374                                      0xFF00 ,
21375                                      0x0400
21376                                     );
21377                 MP_WritePhyUshort(sc, 0x13, 0x810C);
21378                 ClearAndSetEthPhyBit(sc,
21379                                      0x14,
21380                                      0xFF00 ,
21381                                      0x7C00
21382                                     );
21383                 MP_WritePhyUshort(sc, 0x13, 0x810B);
21384                 ClearAndSetEthPhyBit(sc,
21385                                      0x14,
21386                                      0xFF00 ,
21387                                      0x5A00
21388                                     );
21389
21390                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21391                 MP_WritePhyUshort(sc, 0x13, 0x80D1);
21392                 ClearAndSetEthPhyBit(sc,
21393                                      0x14,
21394                                      0xFF00 ,
21395                                      0xFF00
21396                                     );
21397                 MP_WritePhyUshort(sc, 0x13, 0x80CD);
21398                 ClearAndSetEthPhyBit(sc,
21399                                      0x14,
21400                                      0xFF00 ,
21401                                      0x9E00
21402                                     );
21403                 MP_WritePhyUshort(sc, 0x13, 0x80D3);
21404                 ClearAndSetEthPhyBit(sc,
21405                                      0x14,
21406                                      0xFF00 ,
21407                                      0x0E00
21408                                     );
21409                 MP_WritePhyUshort(sc, 0x13, 0x80D5);
21410                 ClearAndSetEthPhyBit(sc,
21411                                      0x14,
21412                                      0xFF00 ,
21413                                      0xCA00
21414                                     );
21415                 MP_WritePhyUshort(sc, 0x13, 0x80D7);
21416                 ClearAndSetEthPhyBit(sc,
21417                                      0x14,
21418                                      0xFF00 ,
21419                                      0x8400
21420                                     );
21421
21422                 if (phy_power_saving == 1) {
21423                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21424                         SetEthPhyBit(sc, 0x10, BIT_2);
21425                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
21426                 } else {
21427                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21428                         ClearEthPhyBit(sc, 0x10, BIT_2);
21429                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
21430                         DELAY(20000);
21431                 }
21432
21433                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21434                 MP_WritePhyUshort(sc, 0x13, 0x8011);
21435                 ClearEthPhyBit(sc, 0x14, BIT_14);
21436                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
21437                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21438                 MP_WritePhyUshort(sc, 0x00, 0x9200);
21439         } else if (sc->re_type == MACFG_63) {
21440                 MP_WritePhyUshort(sc, 0x1f, 0x0002);
21441                 MP_WritePhyUshort(sc, 0x10, 0x0008);
21442                 MP_WritePhyUshort(sc, 0x0d, 0x006c);
21443                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21444
21445                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21446                 MP_WritePhyUshort(sc, 0x17, 0x0cc0);
21447                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21448
21449                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21450                 MP_WritePhyUshort(sc, 0x0B, 0xA4D8);
21451                 MP_WritePhyUshort(sc, 0x09, 0x281C);
21452                 MP_WritePhyUshort(sc, 0x07, 0x2883);
21453                 MP_WritePhyUshort(sc, 0x0A, 0x6B35);
21454                 MP_WritePhyUshort(sc, 0x1D, 0x3DA4);
21455                 MP_WritePhyUshort(sc, 0x1C, 0xEFFD);
21456                 MP_WritePhyUshort(sc, 0x14, 0x7F52);
21457                 MP_WritePhyUshort(sc, 0x18, 0x7FC6);
21458                 MP_WritePhyUshort(sc, 0x08, 0x0601);
21459                 MP_WritePhyUshort(sc, 0x06, 0x4063);
21460                 MP_WritePhyUshort(sc, 0x10, 0xF074);
21461                 MP_WritePhyUshort(sc, 0x1F, 0x0003);
21462                 MP_WritePhyUshort(sc, 0x13, 0x0789);
21463                 MP_WritePhyUshort(sc, 0x12, 0xF4BD);
21464                 MP_WritePhyUshort(sc, 0x1A, 0x04FD);
21465                 MP_WritePhyUshort(sc, 0x14, 0x84B0);
21466                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21467
21468                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
21469                 MP_WritePhyUshort(sc, 0x01, 0x0340);
21470                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21471                 MP_WritePhyUshort(sc, 0x04, 0x4000);
21472                 MP_WritePhyUshort(sc, 0x03, 0x1D21);
21473                 MP_WritePhyUshort(sc, 0x02, 0x0C32);
21474                 MP_WritePhyUshort(sc, 0x01, 0x0200);
21475                 MP_WritePhyUshort(sc, 0x00, 0x5554);
21476                 MP_WritePhyUshort(sc, 0x04, 0x4800);
21477                 MP_WritePhyUshort(sc, 0x04, 0x4000);
21478                 MP_WritePhyUshort(sc, 0x04, 0xF000);
21479                 MP_WritePhyUshort(sc, 0x03, 0xDF01);
21480                 MP_WritePhyUshort(sc, 0x02, 0xDF20);
21481                 MP_WritePhyUshort(sc, 0x01, 0x101A);
21482                 MP_WritePhyUshort(sc, 0x00, 0xA0FF);
21483                 MP_WritePhyUshort(sc, 0x04, 0xF800);
21484                 MP_WritePhyUshort(sc, 0x04, 0xF000);
21485                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21486
21487                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
21488                 MP_WritePhyUshort(sc, 0x1E, 0x0023);
21489                 MP_WritePhyUshort(sc, 0x16, 0x0000);
21490                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21491
21492                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21493                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0D);
21494                 PhyRegValue |= (BIT_5);
21495                 MP_WritePhyUshort(sc, 0x0D, PhyRegValue);
21496
21497                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21498                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0C);
21499                 PhyRegValue |= (BIT_10);
21500                 MP_WritePhyUshort(sc, 0x0C, PhyRegValue);
21501                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21502         } else if (sc->re_type == MACFG_64) {
21503                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21504                 MP_WritePhyUshort(sc, 0x17, 0x0cc0);
21505                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21506
21507                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
21508                 MP_WritePhyUshort(sc, 0x01, 0x0340);
21509                 MP_WritePhyUshort(sc, 0x1F, 0x0001);
21510                 MP_WritePhyUshort(sc, 0x04, 0x4000);
21511                 MP_WritePhyUshort(sc, 0x03, 0x1D21);
21512                 MP_WritePhyUshort(sc, 0x02, 0x0C32);
21513                 MP_WritePhyUshort(sc, 0x01, 0x0200);
21514                 MP_WritePhyUshort(sc, 0x00, 0x5554);
21515                 MP_WritePhyUshort(sc, 0x04, 0x4800);
21516                 MP_WritePhyUshort(sc, 0x04, 0x4000);
21517                 MP_WritePhyUshort(sc, 0x04, 0xF000);
21518                 MP_WritePhyUshort(sc, 0x03, 0xDF01);
21519                 MP_WritePhyUshort(sc, 0x02, 0xDF20);
21520                 MP_WritePhyUshort(sc, 0x01, 0x101A);
21521                 MP_WritePhyUshort(sc, 0x00, 0xA0FF);
21522                 MP_WritePhyUshort(sc, 0x04, 0xF800);
21523                 MP_WritePhyUshort(sc, 0x04, 0xF000);
21524                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21525
21526                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
21527                 MP_WritePhyUshort(sc, 0x1E, 0x0023);
21528                 MP_WritePhyUshort(sc, 0x16, 0x0000);
21529                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21530
21531                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21532                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0D);
21533                 PhyRegValue |= (BIT_5);
21534                 MP_WritePhyUshort(sc, 0x0D, PhyRegValue);
21535
21536                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21537                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0C);
21538                 PhyRegValue |= (BIT_10);
21539                 MP_WritePhyUshort(sc, 0x0C, PhyRegValue);
21540                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21541         } else if (sc->re_type == MACFG_65) {
21542                 MP_WritePhyUshort(sc, 0x1f, 0x0001);
21543                 MP_WritePhyUshort(sc, 0x17, 0x0cc0);
21544                 MP_WritePhyUshort(sc, 0x1f, 0x0000);
21545
21546                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21547                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0D);
21548                 PhyRegValue |= (BIT_5);
21549                 MP_WritePhyUshort(sc, 0x0D, PhyRegValue);
21550
21551                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21552                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0C);
21553                 PhyRegValue |= (BIT_10);
21554                 MP_WritePhyUshort(sc, 0x0C, PhyRegValue);
21555                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21556
21557                 MP_WritePhyUshort(sc, 0x1F, 0x0007);
21558                 MP_WritePhyUshort(sc, 0x1E, 0x002C);
21559                 MP_WritePhyUshort(sc, 0x15, 0x035D);
21560                 MP_WritePhyUshort(sc, 0x1F, 0x0005);
21561                 MP_WritePhyUshort(sc, 0x01, 0x0300);
21562                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21563         } else if (sc->re_type == MACFG_66) {
21564                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21565                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0D);
21566                 PhyRegValue |= (BIT_5);
21567                 MP_WritePhyUshort(sc, 0x0D, PhyRegValue);
21568
21569                 MP_WritePhyUshort(sc, 0x1F, 0x0002);
21570                 PhyRegValue = MP_ReadPhyUshort(sc, 0x0C);
21571                 PhyRegValue |= (BIT_10);
21572                 MP_WritePhyUshort(sc, 0x0C, PhyRegValue);
21573                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21574         } else if (sc->re_type == MACFG_68) {
21575                 MP_WritePhyUshort(sc,0x1f, 0x0B82);
21576                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
21577                 PhyRegValue |= BIT_4;
21578                 MP_WritePhyUshort(sc,0x10, PhyRegValue);
21579
21580                 MP_WritePhyUshort(sc,0x1f, 0x0B80);
21581                 WaitCnt = 0;
21582                 do {
21583                         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
21584                         PhyRegValue &= 0x0040;
21585                         DELAY(50);
21586                         DELAY(50);
21587                         WaitCnt++;
21588                 } while(PhyRegValue != 0x0040 && WaitCnt <1000);
21589
21590                 MP_WritePhyUshort(sc,0x1f, 0x0A43);
21591                 MP_WritePhyUshort(sc,0x13, 0x8028);
21592                 MP_WritePhyUshort(sc,0x14, 0x6200);
21593                 MP_WritePhyUshort(sc,0x13, 0xB82E);
21594                 MP_WritePhyUshort(sc,0x14, 0x0001);
21595
21596                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21597                 MP_WritePhyUshort(sc, 0x13, 0xB820);
21598                 MP_WritePhyUshort(sc, 0x14, 0x0290);
21599                 MP_WritePhyUshort(sc, 0x13, 0xA012);
21600                 MP_WritePhyUshort(sc, 0x14, 0x0000);
21601                 MP_WritePhyUshort(sc, 0x13, 0xA014);
21602                 MP_WritePhyUshort(sc, 0x14, 0x2c04);
21603                 MP_WritePhyUshort(sc, 0x14, 0x2c10);
21604                 MP_WritePhyUshort(sc, 0x14, 0x2c10);
21605                 MP_WritePhyUshort(sc, 0x14, 0x2c10);
21606                 MP_WritePhyUshort(sc, 0x14, 0xa210);
21607                 MP_WritePhyUshort(sc, 0x14, 0xa101);
21608                 MP_WritePhyUshort(sc, 0x14, 0xce10);
21609                 MP_WritePhyUshort(sc, 0x14, 0xe070);
21610                 MP_WritePhyUshort(sc, 0x14, 0x0f40);
21611                 MP_WritePhyUshort(sc, 0x14, 0xaf01);
21612                 MP_WritePhyUshort(sc, 0x14, 0x8f01);
21613                 MP_WritePhyUshort(sc, 0x14, 0x183e);
21614                 MP_WritePhyUshort(sc, 0x14, 0x8e10);
21615                 MP_WritePhyUshort(sc, 0x14, 0x8101);
21616                 MP_WritePhyUshort(sc, 0x14, 0x8210);
21617                 MP_WritePhyUshort(sc, 0x14, 0x28da);
21618                 MP_WritePhyUshort(sc, 0x13, 0xA01A);
21619                 MP_WritePhyUshort(sc, 0x14, 0x0000);
21620                 MP_WritePhyUshort(sc, 0x13, 0xA006);
21621                 MP_WritePhyUshort(sc, 0x14, 0x0017);
21622                 MP_WritePhyUshort(sc, 0x13, 0xA004);
21623                 MP_WritePhyUshort(sc, 0x14, 0x0015);
21624                 MP_WritePhyUshort(sc, 0x13, 0xA002);
21625                 MP_WritePhyUshort(sc, 0x14, 0x0013);
21626                 MP_WritePhyUshort(sc, 0x13, 0xA000);
21627                 MP_WritePhyUshort(sc, 0x14, 0x18d1);
21628                 MP_WritePhyUshort(sc, 0x13, 0xB820);
21629                 MP_WritePhyUshort(sc, 0x14, 0x0210);
21630
21631                 MP_WritePhyUshort(sc,0x1F, 0x0A43);
21632                 MP_WritePhyUshort(sc,0x13, 0x0000);
21633                 MP_WritePhyUshort(sc,0x14, 0x0000);
21634                 MP_WritePhyUshort(sc,0x1f, 0x0B82);
21635                 PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
21636                 PhyRegValue &= ~(BIT_0);
21637                 MP_WritePhyUshort(sc,0x17, PhyRegValue);
21638                 MP_WritePhyUshort(sc,0x1f, 0x0A43);
21639                 MP_WritePhyUshort(sc,0x13, 0x8028);
21640                 MP_WritePhyUshort(sc,0x14, 0x0000);
21641
21642                 MP_WritePhyUshort(sc,0x1f, 0x0B82);
21643                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
21644                 PhyRegValue &= ~(BIT_4);
21645                 MP_WritePhyUshort(sc,0x10, PhyRegValue);
21646
21647
21648
21649                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21650                 MP_WritePhyUshort(sc, 0x13, 0x809b);
21651                 ClearAndSetEthPhyBit(sc,
21652                                      0x14,
21653                                      0xF800 ,
21654                                      0x8000
21655                                     );
21656                 MP_WritePhyUshort(sc, 0x13, 0x80A2);
21657                 ClearAndSetEthPhyBit(sc,
21658                                      0x14,
21659                                      0xFF00 ,
21660                                      0x8000
21661                                     );
21662                 MP_WritePhyUshort(sc, 0x13, 0x80A4);
21663                 ClearAndSetEthPhyBit(sc,
21664                                      0x14,
21665                                      0xFF00 ,
21666                                      0x8500
21667                                     );
21668                 MP_WritePhyUshort(sc, 0x13, 0x809C);
21669                 ClearAndSetEthPhyBit(sc,
21670                                      0x14,
21671                                      0xFF00 ,
21672                                      0xbd00
21673                                     );
21674                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21675
21676                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21677                 MP_WritePhyUshort(sc, 0x13, 0x80AD);
21678                 ClearAndSetEthPhyBit(sc,
21679                                      0x14,
21680                                      0xF800 ,
21681                                      0x7000
21682                                     );
21683                 MP_WritePhyUshort(sc, 0x13, 0x80B4);
21684                 ClearAndSetEthPhyBit(sc,
21685                                      0x14,
21686                                      0xFF00 ,
21687                                      0x5000
21688                                     );
21689                 MP_WritePhyUshort(sc, 0x13, 0x80AC);
21690                 ClearAndSetEthPhyBit(sc,
21691                                      0x14,
21692                                      0xFF00 ,
21693                                      0x4000
21694                                     );
21695                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21696
21697                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21698                 MP_WritePhyUshort(sc, 0x13, 0x808E);
21699                 ClearAndSetEthPhyBit(sc,
21700                                      0x14,
21701                                      0xFF00 ,
21702                                      0x1200
21703                                     );
21704                 MP_WritePhyUshort(sc, 0x13, 0x8090);
21705                 ClearAndSetEthPhyBit(sc,
21706                                      0x14,
21707                                      0xFF00 ,
21708                                      0xE500
21709                                     );
21710                 MP_WritePhyUshort(sc, 0x13, 0x8092);
21711                 ClearAndSetEthPhyBit(sc,
21712                                      0x14,
21713                                      0xFF00 ,
21714                                      0x9F00
21715                                     );
21716                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21717
21718                 dout_tapbin = 0x0000;
21719                 MP_WritePhyUshort(sc, 0x1F, 0x0A46);
21720                 TmpUshort = MP_ReadPhyUshort(sc, 0x13);
21721                 TmpUshort &= (BIT_1|BIT_0);
21722                 TmpUshort <<= 2;
21723                 dout_tapbin |= TmpUshort;
21724
21725                 TmpUshort = MP_ReadPhyUshort(sc, 0x12);
21726                 TmpUshort &= (BIT_15|BIT_14);
21727                 TmpUshort >>= 14;
21728                 dout_tapbin |= TmpUshort;
21729
21730                 dout_tapbin = ~(dout_tapbin^BIT_3);
21731                 dout_tapbin <<= 12;
21732                 dout_tapbin &= 0xF000;
21733
21734                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21735
21736                 MP_WritePhyUshort(sc, 0x13, 0x827A);
21737                 ClearAndSetEthPhyBit(sc,
21738                                      0x14,
21739                                      BIT_15|BIT_14|BIT_13|BIT_12,
21740                                      dout_tapbin
21741                                     );
21742
21743
21744                 MP_WritePhyUshort(sc, 0x13, 0x827B);
21745                 ClearAndSetEthPhyBit(sc,
21746                                      0x14,
21747                                      BIT_15|BIT_14|BIT_13|BIT_12,
21748                                      dout_tapbin
21749                                     );
21750
21751
21752                 MP_WritePhyUshort(sc, 0x13, 0x827C);
21753                 ClearAndSetEthPhyBit(sc,
21754                                      0x14,
21755                                      BIT_15|BIT_14|BIT_13|BIT_12,
21756                                      dout_tapbin
21757                                     );
21758
21759
21760                 MP_WritePhyUshort(sc, 0x13, 0x827D);
21761                 ClearAndSetEthPhyBit(sc,
21762                                      0x14,
21763                                      BIT_15|BIT_14|BIT_13|BIT_12,
21764                                      dout_tapbin
21765                                     );
21766
21767                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21768                 MP_WritePhyUshort(sc, 0x13, 0x8011);
21769                 SetEthPhyBit(sc, 0x14, BIT_11);
21770                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
21771                 SetEthPhyBit(sc, 0x16, BIT_1);
21772
21773                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
21774                 SetEthPhyBit(sc, 0x11, BIT_11);
21775                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21776
21777                 MP_WritePhyUshort(sc, 0x1F, 0x0BCA);
21778                 ClearAndSetEthPhyBit(sc,
21779                                      0x17,
21780                                      (BIT_13 | BIT_12) ,
21781                                      BIT_14
21782                                     );
21783                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21784
21785                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21786                 MP_WritePhyUshort(sc, 0x13, 0x803F);
21787                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
21788                 MP_WritePhyUshort(sc, 0x13, 0x8047);
21789                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
21790                 MP_WritePhyUshort(sc, 0x13, 0x804F);
21791                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
21792                 MP_WritePhyUshort(sc, 0x13, 0x8057);
21793                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
21794                 MP_WritePhyUshort(sc, 0x13, 0x805F);
21795                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
21796                 MP_WritePhyUshort(sc, 0x13, 0x8067);
21797                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
21798                 MP_WritePhyUshort(sc, 0x13, 0x806F);
21799                 ClearEthPhyBit(sc, 0x14, (BIT_13 | BIT_12));
21800                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21801
21802                 if (phy_power_saving == 1) {
21803                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21804                         SetEthPhyBit(sc, 0x10, BIT_2);
21805                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
21806                 } else {
21807                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21808                         ClearEthPhyBit(sc, 0x10, BIT_2);
21809                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
21810                         DELAY(20000);
21811                 }
21812
21813                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21814                 MP_WritePhyUshort(sc, 0x13, 0x8011);
21815                 ClearEthPhyBit(sc, 0x14, BIT_15);
21816                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
21817                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21818                 MP_WritePhyUshort(sc, 0x00, 0x9200);
21819         } else if (sc->re_type == MACFG_69) {
21820                 MP_WritePhyUshort(sc,0x1f, 0x0B82);
21821                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
21822                 PhyRegValue |= BIT_4;
21823                 MP_WritePhyUshort(sc,0x10, PhyRegValue);
21824
21825                 MP_WritePhyUshort(sc,0x1f, 0x0B80);
21826                 WaitCnt = 0;
21827                 do {
21828                         PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
21829                         PhyRegValue &= 0x0040;
21830                         DELAY(50);
21831                         DELAY(50);
21832                         WaitCnt++;
21833                 } while(PhyRegValue != 0x0040 && WaitCnt <1000);
21834
21835                 MP_WritePhyUshort(sc,0x1f, 0x0A43);
21836                 MP_WritePhyUshort(sc,0x13, 0x8028);
21837                 MP_WritePhyUshort(sc,0x14, 0x6201);
21838                 MP_WritePhyUshort(sc,0x13, 0xB82E);
21839                 MP_WritePhyUshort(sc,0x14, 0x0001);
21840
21841                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21842                 MP_WritePhyUshort(sc, 0x13, 0xB820);
21843                 MP_WritePhyUshort(sc, 0x14, 0x0290);
21844                 MP_WritePhyUshort(sc, 0x13, 0xA012);
21845                 MP_WritePhyUshort(sc, 0x14, 0x0000);
21846                 MP_WritePhyUshort(sc, 0x13, 0xA014);
21847                 MP_WritePhyUshort(sc, 0x14, 0x2c04);
21848                 MP_WritePhyUshort(sc, 0x14, 0x2c09);
21849                 MP_WritePhyUshort(sc, 0x14, 0x2c09);
21850                 MP_WritePhyUshort(sc, 0x14, 0x2c09);
21851                 MP_WritePhyUshort(sc, 0x14, 0xad01);
21852                 MP_WritePhyUshort(sc, 0x14, 0xad01);
21853                 MP_WritePhyUshort(sc, 0x14, 0xad01);
21854                 MP_WritePhyUshort(sc, 0x14, 0xad01);
21855                 MP_WritePhyUshort(sc, 0x14, 0x236c);
21856                 MP_WritePhyUshort(sc, 0x13, 0xA01A);
21857                 MP_WritePhyUshort(sc, 0x14, 0x0000);
21858                 MP_WritePhyUshort(sc, 0x13, 0xA006);
21859                 MP_WritePhyUshort(sc, 0x14, 0x0fff);
21860                 MP_WritePhyUshort(sc, 0x13, 0xA004);
21861                 MP_WritePhyUshort(sc, 0x14, 0x0fff);
21862                 MP_WritePhyUshort(sc, 0x13, 0xA002);
21863                 MP_WritePhyUshort(sc, 0x14, 0x0fff);
21864                 MP_WritePhyUshort(sc, 0x13, 0xA000);
21865                 MP_WritePhyUshort(sc, 0x14, 0x136b);
21866                 MP_WritePhyUshort(sc, 0x13, 0xB820);
21867                 MP_WritePhyUshort(sc, 0x14, 0x0210);
21868
21869                 MP_WritePhyUshort(sc,0x1F, 0x0A43);
21870                 MP_WritePhyUshort(sc,0x13, 0x0000);
21871                 MP_WritePhyUshort(sc,0x14, 0x0000);
21872                 MP_WritePhyUshort(sc,0x1f, 0x0B82);
21873                 PhyRegValue = MP_ReadPhyUshort(sc, 0x17);
21874                 PhyRegValue &= ~(BIT_0);
21875                 MP_WritePhyUshort(sc,0x17, PhyRegValue);
21876                 MP_WritePhyUshort(sc,0x1f, 0x0A43);
21877                 MP_WritePhyUshort(sc,0x13, 0x8028);
21878                 MP_WritePhyUshort(sc,0x14, 0x0000);
21879
21880                 MP_WritePhyUshort(sc,0x1f, 0x0B82);
21881                 PhyRegValue = MP_ReadPhyUshort(sc, 0x10);
21882                 PhyRegValue &= ~(BIT_4);
21883                 MP_WritePhyUshort(sc,0x10, PhyRegValue);
21884
21885
21886                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21887                 MP_WritePhyUshort(sc, 0x13, 0x808A);
21888                 ClearAndSetEthPhyBit(sc,
21889                                      0x14,
21890                                      BIT_5 | BIT_4 | BIT_3 | BIT_2 | BIT_1 | BIT_0,
21891                                      0x0A);
21892
21893                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21894                 MP_WritePhyUshort(sc, 0x13, 0x8011);
21895                 SetEthPhyBit(sc, 0x14, BIT_11);
21896                 MP_WritePhyUshort(sc, 0x1F, 0x0A42);
21897                 SetEthPhyBit(sc, 0x16, BIT_1);
21898
21899                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
21900                 SetEthPhyBit(sc, 0x11, BIT_11);
21901                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21902
21903                 if (sc->RequireAdcBiasPatch) {
21904                         MP_WritePhyUshort(sc, 0x1F, 0x0BCF);
21905                         MP_WritePhyUshort(sc, 0x16, sc->AdcBiasPatchIoffset);
21906                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
21907                 }
21908
21909                 {
21910                         u_int16_t rlen;
21911
21912                         MP_WritePhyUshort(sc, 0x1F, 0x0BCD);
21913                         PhyRegValue = MP_ReadPhyUshort(sc, 0x16);
21914                         PhyRegValue &= 0x000F;
21915
21916                         if (PhyRegValue > 3) {
21917                                 rlen = PhyRegValue - 3;
21918                         } else {
21919                                 rlen = 0;
21920                         }
21921
21922                         PhyRegValue = rlen | (rlen<<4) | (rlen<<8) | (rlen<<12);
21923
21924                         MP_WritePhyUshort(sc, 0x1F, 0x0BCD);
21925                         MP_WritePhyUshort(sc, 0x17, PhyRegValue);
21926                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
21927                 }
21928
21929                 if (phy_power_saving == 1) {
21930                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21931                         SetEthPhyBit(sc, 0x10, BIT_2);
21932                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
21933                 } else {
21934                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21935                         ClearEthPhyBit(sc, 0x10, BIT_2);
21936                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
21937                         DELAY(20000);
21938                 }
21939
21940                 MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21941                 MP_WritePhyUshort(sc, 0x13, 0x8011);
21942                 ClearEthPhyBit(sc, 0x14, BIT_15);
21943                 MP_WritePhyUshort(sc, 0x1F, 0x0A40);
21944                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21945                 MP_WritePhyUshort(sc, 0x00, 0x9200);
21946         }
21947         //EthPhyPPSW
21948         if (sc->re_type == MACFG_56 || sc->re_type == MACFG_56 ||
21949             sc->re_type == MACFG_58 || sc->re_type == MACFG_58 ||
21950             sc->re_type == MACFG_60) {
21951                 //disable EthPhyPPSW
21952                 MP_WritePhyUshort(sc, 0x1F, 0x0BCD);
21953                 MP_WritePhyUshort(sc, 0x14, 0x5065);
21954                 MP_WritePhyUshort(sc, 0x14, 0xD065);
21955                 MP_WritePhyUshort(sc, 0x1F, 0x0BC8);
21956                 MP_WritePhyUshort(sc, 0x12, 0x00ED);
21957                 MP_WritePhyUshort(sc, 0x1F, 0x0BCD);
21958                 MP_WritePhyUshort(sc, 0x14, 0x1065);
21959                 MP_WritePhyUshort(sc, 0x14, 0x9065);
21960                 MP_WritePhyUshort(sc, 0x14, 0x1065);
21961                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21962         } else if (sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
21963                 //enable EthPhyPPSW
21964                 MP_WritePhyUshort(sc, 0x1F, 0x0A44);
21965                 SetEthPhyBit(sc, 0x11, BIT_7);
21966                 MP_WritePhyUshort(sc, 0x1F, 0x0000);
21967         }
21968
21969         switch(sc->re_type) {
21970         case MACFG_56:
21971         case MACFG_57:
21972         case MACFG_58:
21973         case MACFG_59:
21974         case MACFG_60:
21975         case MACFG_61:
21976         case MACFG_62:
21977         case MACFG_67:
21978         case MACFG_68:
21979         case MACFG_69:
21980                 if (phy_mdix_mode == RE_ETH_PHY_FORCE_MDI) {
21981                         //Force MDI
21982                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21983                         SetEthPhyBit(sc, 0x10, BIT_8 | BIT_9);
21984                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
21985                 } else if (phy_mdix_mode == RE_ETH_PHY_FORCE_MDIX) {
21986                         //Force MDIX
21987                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21988                         ClearEthPhyBit(sc, 0x10, BIT_8);
21989                         SetEthPhyBit(sc, 0x10, BIT_9);
21990                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
21991                 } else {
21992                         //Auto MDI/MDIX
21993                         MP_WritePhyUshort(sc, 0x1F, 0x0A43);
21994                         ClearEthPhyBit(sc, 0x10, BIT_8 | BIT_9);
21995                         MP_WritePhyUshort(sc, 0x1F, 0x0000);
21996                 }
21997
21998                 break;
21999         }
22000
22001         if (phy_power_saving == 1) {
22002                 if (sc->re_type == MACFG_59 || sc->re_type == MACFG_60 ||
22003                     sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
22004                     sc->re_type == MACFG_68 || sc->re_type == MACFG_69) {
22005                         MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0000);
22006                         MP_WritePhyOcpRegWord(sc, 0x0C41, 0x13, 0x0050);
22007                 }
22008         }
22009
22010         if (eee_enable == 1)
22011                 re_enable_EEE(sc);
22012         else
22013                 re_disable_EEE(sc);
22014
22015         MP_WritePhyUshort(sc, 0x1F, 0x0000);
22016 }
22017
22018 void MP_WritePhyUshort(struct re_softc *sc,u_int8_t RegAddr,u_int16_t RegData)
22019 {
22020         u_int32_t               TmpUlong=0x80000000;
22021         u_int32_t               Timeout=0;
22022
22023         if (RegAddr == 0x1F) {
22024                 sc->cur_page = RegData;
22025         }
22026
22027         if (sc->re_type == MACFG_63) {
22028                 int i;
22029                 CSR_WRITE_4(sc, RE_OCPDR, OCPDR_Write |
22030                             (RegAddr & OCPDR_Reg_Mask) << OCPDR_GPHY_Reg_shift |
22031                             (RegData & OCPDR_Data_Mask));
22032                 CSR_WRITE_4(sc, RE_OCPAR, OCPAR_GPHY_Write);
22033                 CSR_WRITE_4(sc, RE_EPHY_RXER_NUM, 0);
22034
22035                 for (i = 0; i < 100; i++) {
22036                         DELAY(1000);
22037                         if (!(CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag))
22038                                 break;
22039                 }
22040         } else if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
22041                    sc->re_type == MACFG_58 || sc->re_type == MACFG_59 ||
22042                    sc->re_type == MACFG_60 || sc->re_type == MACFG_61 ||
22043                    sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
22044                    sc->re_type == MACFG_69 || sc->re_type == MACFG_69) {
22045                 if (RegAddr == 0x1F) {
22046                         return;
22047                 }
22048
22049                 MP_WritePhyOcpRegWord(sc, sc->cur_page, RegAddr, RegData);
22050         } else {
22051                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66)
22052                         CSR_WRITE_4(sc, 0xD0, CSR_READ_4(sc,0xD0) & ~0x00020000);
22053
22054                 TmpUlong |= (((u_int32_t)RegAddr)<<16 | (u_int32_t)RegData);
22055
22056                 CSR_WRITE_4(sc, RE_PHYAR, TmpUlong);
22057
22058                 /* Wait for writing to Phy ok */
22059                 for (Timeout=0; Timeout<5; Timeout++) {
22060                         DELAY(1000);
22061                         if ((CSR_READ_4(sc, RE_PHYAR)&PHYAR_Flag)==0)
22062                                 break;
22063                 }
22064
22065                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66)
22066                         CSR_WRITE_4(sc, 0xD0, CSR_READ_4(sc,0xD0) | 0x00020000);
22067         }
22068 }
22069
22070 u_int16_t MP_ReadPhyUshort(struct re_softc *sc,u_int8_t RegAddr)
22071 {
22072         u_int16_t               RegData;
22073         u_int32_t               TmpUlong;
22074         u_int32_t               Timeout=0;
22075
22076         if (sc->re_type == MACFG_63) {
22077                 int i;
22078                 CSR_WRITE_4(sc, RE_OCPDR, OCPDR_Read |
22079                             (RegAddr & OCPDR_Reg_Mask) << OCPDR_GPHY_Reg_shift);
22080                 CSR_WRITE_4(sc, RE_OCPAR, OCPAR_GPHY_Write);
22081                 CSR_WRITE_4(sc, RE_EPHY_RXER_NUM, 0);
22082
22083                 for (i = 0; i < 100; i++) {
22084                         DELAY(1000);
22085                         if (!(CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag))
22086                                 break;
22087                 }
22088
22089                 DELAY(1000);
22090                 CSR_WRITE_4(sc, RE_OCPAR, OCPAR_GPHY_Read);
22091                 CSR_WRITE_4(sc, RE_EPHY_RXER_NUM, 0);
22092
22093                 for (i = 0; i < 100; i++) {
22094                         DELAY(1000);
22095                         if (CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag)
22096                                 break;
22097                 }
22098
22099                 RegData = CSR_READ_4(sc, RE_OCPDR) & OCPDR_Data_Mask;
22100         } else if (sc->re_type == MACFG_56 || sc->re_type == MACFG_57 ||
22101                    sc->re_type == MACFG_58 || sc->re_type == MACFG_59 ||
22102                    sc->re_type == MACFG_60 || sc->re_type == MACFG_61 ||
22103                    sc->re_type == MACFG_62 || sc->re_type == MACFG_67 ||
22104                    sc->re_type == MACFG_69 || sc->re_type == MACFG_69) {
22105                 RegData= MP_ReadPhyOcpRegWord(sc, sc->cur_page, RegAddr);
22106
22107         } else {
22108                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66)
22109                         CSR_WRITE_4(sc, 0xD0, CSR_READ_4(sc,0xD0) & ~0x00020000);
22110
22111                 TmpUlong = ((u_int32_t)RegAddr << 16);
22112                 CSR_WRITE_4(sc, RE_PHYAR, TmpUlong);
22113
22114                 /* Wait for writing to Phy ok */
22115                 for (Timeout=0; Timeout<5; Timeout++) {
22116                         DELAY(1000);
22117                         TmpUlong = CSR_READ_4(sc, RE_PHYAR);
22118                         if ((TmpUlong&PHYAR_Flag)!=0)
22119                                 break;
22120                 }
22121
22122                 RegData = (u_int16_t)(TmpUlong & 0x0000ffff);
22123
22124                 if (sc->re_type == MACFG_65 || sc->re_type == MACFG_66)
22125                         CSR_WRITE_4(sc, 0xD0, CSR_READ_4(sc,0xD0) | 0x00020000);
22126         }
22127
22128         return RegData;
22129 }
22130
22131 void MP_WriteEPhyUshort(struct re_softc *sc, u_int8_t RegAddr, u_int16_t RegData)
22132 {
22133         u_int32_t               TmpUlong=0x80000000;
22134         u_int32_t               Timeout=0;
22135
22136         TmpUlong |= (((u_int32_t)RegAddr<<16) | (u_int32_t)RegData);
22137
22138         CSR_WRITE_4(sc, RE_EPHYAR, TmpUlong);
22139
22140         /* Wait for writing to Phy ok */
22141         for (Timeout=0; Timeout<5; Timeout++) {
22142                 DELAY(1000);
22143                 if ((CSR_READ_4(sc, RE_EPHYAR)&PHYAR_Flag)==0)
22144                         break;
22145         }
22146 }
22147
22148 u_int16_t MP_ReadEPhyUshort(struct re_softc *sc, u_int8_t RegAddr)
22149 {
22150         u_int16_t               RegData;
22151         u_int32_t               TmpUlong;
22152         u_int32_t               Timeout=0;
22153
22154         TmpUlong = ((u_int32_t)RegAddr << 16);
22155         CSR_WRITE_4(sc, RE_EPHYAR, TmpUlong);
22156
22157         /* Wait for writing to Phy ok */
22158         for (Timeout=0; Timeout<5; Timeout++) {
22159                 DELAY(1000);
22160                 TmpUlong = CSR_READ_4(sc, RE_EPHYAR);
22161                 if ((TmpUlong&PHYAR_Flag)!=0)
22162                         break;
22163         }
22164
22165         RegData = (u_int16_t)(TmpUlong & 0x0000ffff);
22166
22167         return RegData;
22168 }
22169
22170 u_int8_t MP_ReadEfuse(struct re_softc *sc, u_int16_t RegAddr)
22171 {
22172         u_int8_t                RegData;
22173         u_int32_t               TmpUlong;
22174         u_int32_t               Timeout=0;
22175
22176         RegAddr &= 0x3FF;
22177         TmpUlong = ((u_int32_t)RegAddr << 8);
22178         CSR_WRITE_4(sc, 0xDC, TmpUlong);
22179
22180         /* Wait for writing to Phy ok */
22181         for (Timeout=0; Timeout<5; Timeout++) {
22182                 DELAY(1000);
22183                 TmpUlong = CSR_READ_4(sc, 0xDC);
22184                 if ((TmpUlong&PHYAR_Flag)!=0)
22185                         break;
22186         }
22187
22188         RegData = (u_int8_t)(TmpUlong & 0x000000ff);
22189
22190         return RegData;
22191 }
22192
22193 static void MP_WriteOtherFunPciEConfigSpace(
22194         struct re_softc *sc,
22195         u_int8_t MultiFunSelBit,
22196         u_int16_t ByteEnAndAddr,
22197         u_int32_t RegData)
22198 {
22199         u_int32_t Timeout = 0, WaitCount = 10;
22200         u_int32_t TmpUlong = 0x80000000;
22201         u_int32_t WriteDone;
22202
22203         if (MultiFunSelBit > 7) {
22204                 return;
22205         }
22206
22207         TmpUlong |= MultiFunSelBit << 16;
22208
22209         CSR_WRITE_4(sc, RE_CSIDR, RegData);
22210         TmpUlong |= (u_int32_t) ByteEnAndAddr;
22211         CSR_WRITE_4(sc, RE_CSIAR, TmpUlong);
22212
22213         do {
22214                 DELAY(100);
22215
22216                 WriteDone = CSR_READ_4(sc, RE_CSIAR);
22217                 Timeout++;
22218         } while (((WriteDone & 0x80000000) != 0) && (Timeout < WaitCount));
22219
22220
22221         DELAY(50);
22222 }
22223
22224 static u_int32_t MP_ReadOtherFunPciEConfigSpace(
22225         struct re_softc *sc,
22226         u_int8_t MultiFunSelBit,
22227         u_int16_t ByteEnAndAddr)
22228 {
22229         u_int32_t Timeout = 0, WaitCount = 10;
22230         u_int32_t TmpUlong = 0x00000000;
22231         u_int32_t ReadDone;
22232         u_int32_t RetVal = 0xffffffff;
22233
22234         if (MultiFunSelBit > 7) {
22235                 return 0xffffffff;
22236         }
22237
22238         TmpUlong |= MultiFunSelBit << 16;
22239
22240         TmpUlong |= (u_int32_t) ByteEnAndAddr;
22241         CSR_WRITE_4(sc, RE_CSIAR, TmpUlong);
22242
22243         do {
22244                 DELAY(100);
22245
22246                 ReadDone = CSR_READ_4(sc, RE_CSIAR);
22247                 Timeout++;
22248         } while (((ReadDone & 0x80000000) == 0)&& (Timeout < WaitCount));
22249
22250         DELAY(50);
22251
22252         return RetVal;
22253 }
22254
22255 void MP_WritePciEConfigSpace(
22256         struct re_softc *sc,
22257         u_int16_t ByteEnAndAddr,
22258         u_int32_t RegData)
22259 {
22260         u_int8_t MultiFunSelBit;
22261
22262         if (sc->re_type == MACFG_52 || sc->re_type == MACFG_53) {
22263                 MultiFunSelBit = 2;
22264         } else if (sc->re_type == MACFG_60) {
22265                 MultiFunSelBit = 1;
22266         } else {
22267                 MultiFunSelBit = 0;
22268         }
22269
22270         MP_WriteOtherFunPciEConfigSpace(sc, MultiFunSelBit, ByteEnAndAddr, RegData);
22271
22272 }
22273
22274 u_int32_t MP_ReadPciEConfigSpace(
22275         struct re_softc *sc,
22276         u_int16_t ByteEnAndAddr)
22277 {
22278         u_int8_t MultiFunSelBit;
22279
22280         if (sc->re_type == MACFG_52 || sc->re_type == MACFG_53) {
22281                 MultiFunSelBit = 2;
22282         } else if (sc->re_type == MACFG_60) {
22283                 MultiFunSelBit = 1;
22284         } else {
22285                 MultiFunSelBit = 0;
22286         }
22287
22288         return MP_ReadOtherFunPciEConfigSpace(sc, MultiFunSelBit, ByteEnAndAddr);
22289 }
22290
22291 static u_int16_t MappingPhyOcpAddress(
22292         struct re_softc *sc,
22293         u_int16_t   PageNum,
22294         u_int8_t  RegNum)
22295 {
22296         u_int16_t OcpPageNum = 0;
22297         u_int8_t OcpRegNum = 0;
22298         u_int16_t OcpPhyAddress = 0;
22299
22300         if (PageNum == 0) {
22301                 OcpPageNum = 0x0A40 + (RegNum / 8);
22302                 OcpRegNum = 0x10 + (RegNum % 8);
22303         } else {
22304                 OcpPageNum = PageNum;
22305                 OcpRegNum = RegNum;
22306         }
22307
22308         OcpPageNum <<= 4;
22309
22310         if (OcpRegNum < 16) {
22311                 OcpPhyAddress = 0;
22312         } else {
22313                 OcpRegNum -= 16;
22314                 OcpRegNum <<= 1;
22315
22316                 OcpPhyAddress = OcpPageNum + OcpRegNum;
22317         }
22318
22319         return OcpPhyAddress;
22320 }
22321
22322 static u_int16_t MP_RealReadPhyOcpRegWord(
22323         struct re_softc *sc,
22324         u_int16_t OcpRegAddr)
22325 {
22326         u_int32_t Timeout = 0, WaitCount = 100;
22327         u_int32_t TmpUlong;
22328         u_int16_t RetVal = 0xffff;
22329
22330         TmpUlong = OcpRegAddr / 2;
22331         TmpUlong <<= 16;
22332
22333         CSR_WRITE_4(sc, RE_PHYOCPACCESS, TmpUlong);
22334
22335         do {
22336                 DELAY(1);
22337
22338                 TmpUlong = CSR_READ_4(sc, RE_PHYOCPACCESS);
22339
22340                 Timeout++;
22341         } while ((!(TmpUlong & PHYAR_Flag)) && (Timeout < WaitCount));
22342
22343         RetVal = (u_int16_t)TmpUlong;
22344
22345         return RetVal;
22346 }
22347
22348 u_int16_t MP_ReadPhyOcpRegWord(
22349         struct re_softc *sc,
22350         u_int16_t PhyPage,
22351         u_int8_t PhyRegNum)
22352 {
22353         u_int16_t OcpRegAddr;
22354         u_int16_t RetVal = 0xffff;
22355
22356         OcpRegAddr = MappingPhyOcpAddress(sc, PhyPage, PhyRegNum);
22357
22358         if (OcpRegAddr % 2) {
22359                 u_int16_t tmpUshort;
22360
22361                 tmpUshort = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr);
22362                 tmpUshort &= 0xFF00;
22363                 tmpUshort >>= 8;
22364                 RetVal = tmpUshort;
22365
22366
22367                 tmpUshort = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr + 1);
22368                 tmpUshort &= 0x00FF;
22369                 tmpUshort <<= 8;
22370                 RetVal |= tmpUshort;
22371         } else {
22372                 RetVal = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr);
22373         }
22374
22375         return RetVal;
22376 }
22377
22378 static void MP_RealWritePhyOcpRegWord(
22379         struct re_softc *sc,
22380         u_int16_t OcpRegAddr,
22381         u_int16_t RegData)
22382 {
22383         u_int32_t Timeout = 0, WaitCount = 100;
22384         u_int32_t TmpUlong;
22385
22386         TmpUlong = OcpRegAddr / 2;
22387         TmpUlong <<= 16;
22388         TmpUlong += RegData;
22389         TmpUlong |= BIT_31;
22390
22391         CSR_WRITE_4(sc, RE_PHYOCPACCESS, TmpUlong);
22392
22393         do {
22394                 DELAY(1);
22395
22396                 TmpUlong = CSR_READ_4(sc, RE_PHYOCPACCESS);
22397
22398                 Timeout++;
22399         } while ((TmpUlong & PHYAR_Flag) && (Timeout < WaitCount));
22400 }
22401
22402 void MP_WritePhyOcpRegWord(
22403         struct re_softc *sc,
22404         u_int16_t PhyPage,
22405         u_int8_t PhyRegNum,
22406         u_int16_t RegData)
22407 {
22408         u_int16_t OcpRegAddr;
22409
22410         OcpRegAddr = MappingPhyOcpAddress(sc, PhyPage, PhyRegNum);
22411
22412         if (OcpRegAddr % 2) {
22413                 u_int16_t tmpUshort;
22414
22415                 tmpUshort = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr);
22416                 tmpUshort &= 0x00FF;
22417                 tmpUshort |= (RegData <<  8);
22418                 MP_RealWritePhyOcpRegWord(sc, OcpRegAddr, tmpUshort);
22419                 tmpUshort = MP_RealReadPhyOcpRegWord(sc, OcpRegAddr + 1);
22420                 tmpUshort &= 0xFF00;
22421                 tmpUshort |= (RegData >> 8);
22422                 MP_RealWritePhyOcpRegWord(sc, OcpRegAddr + 1, tmpUshort);
22423         } else {
22424                 MP_RealWritePhyOcpRegWord(sc, OcpRegAddr, RegData);
22425         }
22426 }
22427
22428 void MP_WriteMcuAccessRegWord(
22429         struct re_softc *sc,
22430         u_int16_t ExtRegAddr,
22431         u_int16_t RegData)
22432 {
22433         u_int32_t TmpUlong;
22434
22435         TmpUlong = ExtRegAddr / 2;
22436         TmpUlong <<= 16;
22437         TmpUlong += RegData;
22438         TmpUlong |= BIT_31;
22439
22440         CSR_WRITE_4(sc, RE_MCUACCESS, TmpUlong);
22441 }
22442
22443 u_int16_t MP_ReadMcuAccessRegWord(
22444         struct re_softc *sc,
22445         u_int16_t ExtRegAddr)
22446 {
22447         u_int32_t TmpUlong;
22448         u_int16_t RetVal = 0xffff;
22449
22450         TmpUlong = ExtRegAddr / 2;
22451         TmpUlong <<= 16;
22452
22453         CSR_WRITE_4(sc, RE_MCUACCESS, TmpUlong);
22454         TmpUlong = CSR_READ_4(sc, RE_MCUACCESS);
22455         RetVal = (u_int16_t)TmpUlong;
22456
22457         return RetVal;
22458 }
22459
22460 static u_int32_t real_ocp_read(struct re_softc *sc, u_int16_t addr, u_int8_t len)
22461 {
22462         int i, val_shift, shift = 0;
22463         u_int32_t value1 = 0, value2 = 0, mask;
22464
22465         if (len > 4 || len <= 0)
22466                 return -1;
22467
22468         while (len > 0) {
22469                 val_shift = addr % 4;
22470                 addr = addr & ~0x3;
22471
22472                 CSR_WRITE_4(sc, RE_OCPAR, (0x0F<<12) | (addr&0xFFF));
22473
22474                 for (i = 0; i < 20; i++) {
22475                         DELAY(100);
22476                         if (CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag)
22477                                 break;
22478                 }
22479
22480                 if (len == 1)       mask = (0xFF << (val_shift * 8)) & 0xFFFFFFFF;
22481                 else if (len == 2)  mask = (0xFFFF << (val_shift * 8)) & 0xFFFFFFFF;
22482                 else if (len == 3)  mask = (0xFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
22483                 else            mask = (0xFFFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
22484
22485                 value1 = CSR_READ_4(sc, RE_OCPDR) & mask;
22486                 value2 |= (value1 >> val_shift * 8) << shift * 8;
22487
22488                 if (len <= 4 - val_shift) {
22489                         len = 0;
22490                 } else {
22491                         len -= (4 - val_shift);
22492                         shift = 4 - val_shift;
22493                         addr += 4;
22494                 }
22495         }
22496
22497         DELAY(20);
22498
22499         return value2;
22500 }
22501
22502 static u_int32_t OCP_read(struct re_softc *sc, u_int16_t addr, u_int8_t len)
22503 {
22504         u_int32_t value = 0;
22505
22506         if (sc->re_type == MACFG_61 || sc->re_type == MACFG_62 ||
22507             sc->re_type == MACFG_67) {
22508                 value = re_eri_read(sc, addr, len, ERIAR_OOB);
22509         } else {
22510                 value = real_ocp_read(sc, addr, len);
22511         }
22512
22513         return value;
22514 }
22515
22516 static int real_ocp_write(struct re_softc *sc, u_int16_t addr, u_int8_t len, u_int32_t value)
22517 {
22518         int i, val_shift, shift = 0;
22519         u_int32_t value1 = 0, mask;
22520
22521         if (len > 4 || len <= 0)
22522                 return -1;
22523
22524         while (len > 0) {
22525                 val_shift = addr % 4;
22526                 addr = addr & ~0x3;
22527
22528                 if (len == 1)       mask = (0xFF << (val_shift * 8)) & 0xFFFFFFFF;
22529                 else if (len == 2)  mask = (0xFFFF << (val_shift * 8)) & 0xFFFFFFFF;
22530                 else if (len == 3)  mask = (0xFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
22531                 else            mask = (0xFFFFFFFF << (val_shift * 8)) & 0xFFFFFFFF;
22532
22533                 value1 = OCP_read(sc, addr, 4) & ~mask;
22534                 value1 |= ((value << val_shift * 8) >> shift * 8);
22535
22536                 CSR_WRITE_4(sc, RE_OCPDR, value1);
22537                 CSR_WRITE_4(sc, RE_OCPAR, OCPAR_Flag | (0x0F<<12) | (addr&0xFFF));
22538
22539                 for (i = 0; i < 10; i++) {
22540                         DELAY(100);
22541
22542                         /* Check if the RTL8168 has completed ERI write */
22543                         if (!(CSR_READ_4(sc, RE_OCPAR) & OCPAR_Flag))
22544                                 break;
22545                 }
22546
22547                 if (len <= 4 - val_shift) {
22548                         len = 0;
22549                 } else {
22550                         len -= (4 - val_shift);
22551                         shift = 4 - val_shift;
22552                         addr += 4;
22553                 }
22554         }
22555
22556         DELAY(20);
22557
22558         return 0;
22559 }
22560
22561 static void OCP_write(struct re_softc *sc, u_int16_t addr, u_int8_t len, u_int32_t value)
22562 {
22563         if (sc->re_type == MACFG_61 || sc->re_type == MACFG_62 ||
22564             sc->re_type == MACFG_67) {
22565                 re_eri_write(sc, addr, len, value, ERIAR_OOB);
22566         } else {
22567                 real_ocp_write(sc, addr, len, value);
22568         }
22569 }
22570
22571 static void OOB_mutex_lock(struct re_softc *sc)
22572 {
22573         u_int8_t reg_16, reg_a0;
22574         u_int32_t wait_cnt_0, wait_Cnt_1;
22575         u_int16_t ocp_reg_mutex_ib;
22576         u_int16_t ocp_reg_mutex_oob;
22577         u_int16_t ocp_reg_mutex_prio;
22578
22579         switch (sc->re_type) {
22580         case MACFG_63:
22581         case MACFG_64:
22582         case MACFG_65:
22583                 ocp_reg_mutex_oob = 0x16;
22584                 ocp_reg_mutex_ib = 0x17;
22585                 ocp_reg_mutex_prio = 0x9C;
22586                 break;
22587         case MACFG_66:
22588                 ocp_reg_mutex_oob = 0x06;
22589                 ocp_reg_mutex_ib = 0x07;
22590                 ocp_reg_mutex_prio = 0x9C;
22591                 break;
22592         case MACFG_61:
22593         case MACFG_62:
22594         case MACFG_67:
22595         default:
22596                 ocp_reg_mutex_oob = 0x110;
22597                 ocp_reg_mutex_ib = 0x114;
22598                 ocp_reg_mutex_prio = 0x11C;
22599                 break;
22600         }
22601
22602         OCP_write(sc, ocp_reg_mutex_ib, 1, BIT_0);
22603         reg_16 = OCP_read(sc, ocp_reg_mutex_oob, 1);
22604         wait_cnt_0 = 0;
22605         while(reg_16) {
22606                 reg_a0 = OCP_read(sc, ocp_reg_mutex_prio, 1);
22607                 if (reg_a0) {
22608                         OCP_write(sc, ocp_reg_mutex_ib, 1, 0x00);
22609                         reg_a0 = OCP_read(sc, ocp_reg_mutex_prio, 1);
22610                         wait_Cnt_1 = 0;
22611                         while(reg_a0) {
22612                                 reg_a0 = OCP_read(sc, ocp_reg_mutex_prio, 1);
22613
22614                                 wait_Cnt_1++;
22615
22616                                 if (wait_Cnt_1 > 2000)
22617                                         break;
22618                         };
22619                         OCP_write(sc, ocp_reg_mutex_ib, 1, BIT_0);
22620
22621                 }
22622                 reg_16 = OCP_read(sc, ocp_reg_mutex_oob, 1);
22623
22624                 wait_cnt_0++;
22625
22626                 if (wait_cnt_0 > 2000)
22627                         break;
22628         };
22629 }
22630
22631 static void OOB_mutex_unlock(struct re_softc *sc)
22632 {
22633         u_int16_t ocp_reg_mutex_ib;
22634         u_int16_t ocp_reg_mutex_oob;
22635         u_int16_t ocp_reg_mutex_prio;
22636
22637         switch (sc->re_type) {
22638         case MACFG_63:
22639         case MACFG_64:
22640         case MACFG_65:
22641                 ocp_reg_mutex_oob = 0x16;
22642                 ocp_reg_mutex_ib = 0x17;
22643                 ocp_reg_mutex_prio = 0x9C;
22644                 break;
22645         case MACFG_66:
22646                 ocp_reg_mutex_oob = 0x06;
22647                 ocp_reg_mutex_ib = 0x07;
22648                 ocp_reg_mutex_prio = 0x9C;
22649                 break;
22650         case MACFG_61:
22651         case MACFG_62:
22652         case MACFG_67:
22653         default:
22654                 ocp_reg_mutex_oob = 0x110;
22655                 ocp_reg_mutex_ib = 0x114;
22656                 ocp_reg_mutex_prio = 0x11C;
22657                 break;
22658         }
22659
22660         OCP_write(sc, ocp_reg_mutex_prio, 1, BIT_0);
22661         OCP_write(sc, ocp_reg_mutex_ib, 1, 0x00);
22662 }
22663
22664 static int re_check_dash(struct re_softc *sc)
22665 {
22666         if (sc->re_type == MACFG_61 || sc->re_type == MACFG_62 ||
22667             sc->re_type == MACFG_67) {
22668                 if (OCP_read(sc, 0x128, 1) & BIT_0)
22669                         return 1;
22670                 else
22671                         return 0;
22672         } else {
22673                 u_int32_t reg;
22674
22675                 if (sc->re_type == MACFG_66)
22676                         reg = 0xb8;
22677                 else
22678                         reg = 0x10;
22679
22680                 if (OCP_read(sc, reg, 2) & 0x00008000)
22681                         return 1;
22682                 else
22683                         return 0;
22684         }
22685 }
22686
22687 static void OOB_notify(struct re_softc *sc, u_int8_t cmd)
22688 {
22689         int i;
22690
22691         CSR_WRITE_1(sc, RE_ERIDR, cmd);
22692         CSR_WRITE_4(sc, RE_ERIAR, 0x800010E8);
22693         DELAY(2000);
22694         for (i = 0; i < 5; i++) {
22695                 DELAY(100);
22696                 if (!(CSR_READ_4(sc, RE_ERIAR) & ERIAR_Flag))
22697                         break;
22698         }
22699
22700         OCP_write(sc, 0x30, 1, 0x01);
22701 }
22702
22703 void re_driver_start(struct re_softc *sc)
22704 {
22705         if (sc->re_type == MACFG_61 || sc->re_type == MACFG_62 ||
22706             sc->re_type == MACFG_67) {
22707                 u_int32_t tmp_value;
22708
22709                 if (!re_check_dash(sc))
22710                         return;
22711
22712                 OCP_write(sc, 0x180, 1, OOB_CMD_DRIVER_START);
22713                 tmp_value = OCP_read(sc, 0x30, 1);
22714                 tmp_value |= BIT_0;
22715                 OCP_write(sc, 0x30, 1, tmp_value);
22716         } else {
22717                 int timeout;
22718                 u_int32_t reg;
22719
22720                 if (sc->re_type == MACFG_66) {
22721                         CSR_WRITE_1(sc, RE_TwiCmdReg, CSR_READ_1(sc, RE_TwiCmdReg) | (BIT_7));
22722                 }
22723
22724                 OOB_notify(sc, OOB_CMD_DRIVER_START);
22725
22726                 if (sc->re_type == MACFG_66)
22727                         reg = 0xB8;
22728                 else
22729                         reg = 0x10;
22730
22731                 for (timeout = 0; timeout < 10; timeout++) {
22732                         DELAY(10000);
22733                         if (OCP_read(sc, reg, 2) & BIT_11)
22734                                 break;
22735                 }
22736         }
22737 }
22738
22739 void re_driver_stop(struct re_softc *sc)
22740 {
22741         if (sc->re_type == MACFG_61 || sc->re_type == MACFG_62 ||
22742             sc->re_type == MACFG_67) {
22743                 u_int32_t tmp_value;
22744
22745                 if (!re_check_dash(sc))
22746                         return;
22747
22748                 Dash2DisableTxRx(sc);
22749
22750                 OCP_write(sc, 0x180, 1, OOB_CMD_DRIVER_STOP);
22751                 tmp_value = OCP_read(sc, 0x30, 1);
22752                 tmp_value |= BIT_0;
22753                 OCP_write(sc, 0x30, 1, tmp_value);
22754         } else {
22755                 int timeout;
22756                 u_int32_t reg;
22757
22758                 OOB_notify(sc, OOB_CMD_DRIVER_STOP);
22759
22760                 if (sc->re_type == MACFG_66)
22761                         reg = 0xB8;
22762                 else
22763                         reg = 0x10;
22764
22765                 for (timeout = 0; timeout < 10; timeout++) {
22766                         DELAY(10000);
22767                         if ((OCP_read(sc, reg, 4) & BIT_11) == 0)
22768                                 break;
22769                 }
22770
22771                 if (sc->re_type == MACFG_66) {
22772                         CSR_WRITE_1(sc, RE_TwiCmdReg, CSR_READ_1(sc, RE_TwiCmdReg) & ~(BIT_7));
22773                 }
22774         }
22775 }
22776
22777 /*----------------------------------------------------------------------------*/
22778 /*      8139 (CR9346) 9346 command register bits (offset 0x50, 1 byte)*/
22779 /*----------------------------------------------------------------------------*/
22780 #define CR9346_EEDO                             0x01                    /* 9346 data out*/
22781 #define CR9346_EEDI                             0x02                    /* 9346 data in*/
22782 #define CR9346_EESK                             0x04                    /* 9346 serial clock*/
22783 #define CR9346_EECS                             0x08                    /* 9346 chip select*/
22784 #define CR9346_EEM0                             0x40                    /* select 8139 operating mode*/
22785 #define CR9346_EEM1                             0x80                    /* 00: normal*/
22786 #define CR9346_CFGRW                    0xC0                    /* Config register write*/
22787 #define CR9346_NORM                     0x00
22788
22789 /*----------------------------------------------------------------------------*/
22790 /*      EEPROM bit definitions(EEPROM control register bits)*/
22791 /*----------------------------------------------------------------------------*/
22792 #define EN_TRNF                                 0x10                    /* Enable turnoff*/
22793 #define EEDO                                            CR9346_EEDO     /* EEPROM data out*/
22794 #define EEDI                                            CR9346_EEDI             /* EEPROM data in (set for writing data)*/
22795 #define EECS                                            CR9346_EECS             /* EEPROM chip select (1=high, 0=low)*/
22796 #define EESK                                            CR9346_EESK             /* EEPROM shift clock (1=high, 0=low)*/
22797
22798 /*----------------------------------------------------------------------------*/
22799 /*      EEPROM opcodes*/
22800 /*----------------------------------------------------------------------------*/
22801 #define EEPROM_READ_OPCODE      06
22802 #define EEPROM_WRITE_OPCODE     05
22803 #define EEPROM_ERASE_OPCODE     07
22804 #define EEPROM_EWEN_OPCODE      19                              /* Erase/write enable*/
22805 #define EEPROM_EWDS_OPCODE      16                              /* Erase/write disable*/
22806
22807 #define CLOCK_RATE                              50                              /* us*/
22808
22809 #define RaiseClock(_sc,_x)                              \
22810         (_x) = (_x) | EESK;                                     \
22811         CSR_WRITE_1((_sc), RE_EECMD, (_x));     \
22812         DELAY(CLOCK_RATE);
22813
22814 #define LowerClock(_sc,_x)                              \
22815         (_x) = (_x) & ~EESK;                                    \
22816         CSR_WRITE_1((_sc), RE_EECMD, (_x));     \
22817         DELAY(CLOCK_RATE);
22818
22819 /*
22820  * Shift out bit(s) to the EEPROM.
22821  */
22822 static void re_eeprom_ShiftOutBits(struct re_softc *sc, int data, int count)
22823 {
22824         u_int16_t x, mask;
22825
22826         mask = 0x01 << (count - 1);
22827         x = CSR_READ_1(sc, RE_EECMD);
22828
22829         x &= ~(EEDO | EEDI);
22830
22831         do {
22832                 x &= ~EEDI;
22833                 if (data & mask)
22834                         x |= EEDI;
22835
22836                 CSR_WRITE_1(sc, RE_EECMD, x);
22837                 DELAY(CLOCK_RATE);
22838                 RaiseClock(sc,x);
22839                 LowerClock(sc,x);
22840                 mask = mask >> 1;
22841         } while (mask);
22842
22843         x &= ~EEDI;
22844         CSR_WRITE_1(sc, RE_EECMD, x);
22845 }
22846
22847 /*
22848  * Shift in bit(s) from the EEPROM.
22849  */
22850 static u_int16_t re_eeprom_ShiftInBits(struct re_softc *sc)
22851 {
22852         u_int16_t x,d,i;
22853         x = CSR_READ_1(sc, RE_EECMD);
22854
22855         x &= ~(EEDO | EEDI);
22856         d = 0;
22857
22858         for (i=0; i<16; i++) {
22859                 d = d << 1;
22860                 RaiseClock(sc, x);
22861
22862                 x = CSR_READ_1(sc, RE_EECMD);
22863
22864                 x &= ~(EEDI);
22865                 if (x & EEDO)
22866                         d |= 1;
22867
22868                 LowerClock(sc, x);
22869         }
22870
22871         return d;
22872 }
22873
22874 /*
22875  * Clean up EEprom read/write setting
22876  */
22877 static void re_eeprom_EEpromCleanup(struct re_softc *sc)
22878 {
22879         u_int16_t x;
22880         x = CSR_READ_1(sc, RE_EECMD);
22881
22882         x &= ~(EECS | EEDI);
22883         CSR_WRITE_1(sc, RE_EECMD, x);
22884
22885         RaiseClock(sc, x);
22886         LowerClock(sc, x);
22887 }
22888
22889 /*
22890  * Read a word of data stored in the EEPROM at address 'addr.'
22891  */
22892 static void re_eeprom_getword(struct re_softc *sc, int addr, u_int16_t *dest)
22893 {
22894         u_int16_t x;
22895
22896         /* select EEPROM, reset bits, set EECS*/
22897         x = CSR_READ_1(sc, RE_EECMD);
22898
22899         x &= ~(EEDI | EEDO | EESK | CR9346_EEM0);
22900         x |= CR9346_EEM1 | EECS;
22901         CSR_WRITE_1(sc, RE_EECMD, x);
22902
22903         /* write the read opcode and register number in that order*/
22904         /* The opcode is 3bits in length, reg is 6 bits long*/
22905         re_eeprom_ShiftOutBits(sc, EEPROM_READ_OPCODE, 3);
22906
22907         if (CSR_READ_4(sc, RE_RXCFG) & RE_RXCFG_RX_9356SEL)
22908                 re_eeprom_ShiftOutBits(sc, addr,8);     /*93c56=8*/
22909         else
22910                 re_eeprom_ShiftOutBits(sc, addr,6);     /*93c46=6*/
22911
22912         /* Now read the data (16 bits) in from the selected EEPROM word*/
22913         *dest=re_eeprom_ShiftInBits(sc);
22914
22915         re_eeprom_EEpromCleanup(sc);
22916         return;
22917 }
22918
22919 /*
22920  * Read a sequence of words from the EEPROM.
22921  */
22922 static void re_read_eeprom(struct re_softc *sc, caddr_t dest, int off, int cnt, int swap)
22923 {
22924         int                     i;
22925         u_int16_t               word = 0, *ptr;
22926
22927         for (i = 0; i < cnt; i++) {
22928                 re_eeprom_getword(sc, off + i, &word);
22929                 ptr = (u_int16_t *)(dest + (i * 2));
22930                 if (swap)
22931                         *ptr = ntohs(word);
22932                 else
22933                         *ptr = word;
22934         }
22935
22936         return;
22937 }
22938
22939 #ifdef __DragonFly__
22940
22941 int
22942 rtl_check_mac_version(struct re_softc *sc)
22943 {
22944
22945         return (re_check_mac_version(sc));
22946 }
22947
22948 void
22949 rtl_init_software_variable(struct re_softc *sc)
22950 {
22951
22952         re_init_software_variable(sc);
22953 }
22954
22955 void
22956 rtl_exit_oob(struct re_softc *sc)
22957 {
22958
22959         re_exit_oob(sc);
22960 }
22961
22962 void
22963 rtl_hw_init(struct re_softc *sc)
22964 {
22965
22966         re_hw_init(sc);
22967 }
22968
22969 void
22970 rtl_reset(struct re_softc *sc)
22971 {
22972
22973         re_reset(sc);
22974 }
22975
22976 void
22977 rtl_get_hw_mac_address(struct re_softc *sc, u_int8_t *eaddr)
22978 {
22979
22980         re_get_hw_mac_address(sc, eaddr);
22981 }
22982
22983 void
22984 rtl_phy_power_up(struct re_softc *sc)
22985 {
22986
22987         re_phy_power_up(sc->dev);
22988 }
22989
22990 void
22991 rtl_hw_phy_config(struct re_softc *sc)
22992 {
22993
22994         re_hw_phy_config(sc);
22995 }
22996
22997 void
22998 rtl_clrwol(struct re_softc *sc)
22999 {
23000
23001         re_clrwol(sc);
23002 }
23003
23004 int
23005 rtl_ifmedia_upd(struct ifnet *ifp)
23006 {
23007
23008         return (re_ifmedia_upd(ifp));
23009 }
23010
23011 void
23012 rtl_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr)
23013 {
23014
23015         re_ifmedia_sts(ifp, ifmr);
23016 }
23017
23018 void
23019 rtl_stop(struct re_softc *sc)
23020 {
23021
23022         re_stop_rtl(sc);
23023 }
23024
23025 u_int8_t
23026 rtl_link_ok(struct re_softc *sc)
23027 {
23028
23029         return (re_link_ok(sc));
23030 }
23031
23032 void
23033 rtl_link_on_patch(struct re_softc *sc)
23034 {
23035
23036         re_link_on_patch(sc);
23037 }
23038
23039 void
23040 rtl_set_eaddr(struct re_softc *sc)
23041 {
23042
23043         re_init_unlock(sc);
23044 }
23045
23046 void
23047 rtl_hw_start(struct re_softc *sc)
23048 {
23049
23050         re_hw_start_unlock(sc);
23051 }
23052
23053 void
23054 rtl_set_rx_packet_filter(struct re_softc *sc)
23055 {
23056
23057         re_set_rx_packet_filter(sc);
23058 }
23059
23060 void
23061 rtl_hw_d3_para(struct re_softc *sc)
23062 {
23063
23064         re_hw_d3_para(sc);
23065 }
23066
23067 void
23068 rtl_phy_power_down(struct re_softc *sc)
23069 {
23070
23071         re_phy_power_down(sc->dev);
23072 }
23073
23074 #endif  /* __DragonFly__ */