1
2
3
4
5
6
7
8
9
10
11
12#include <common.h>
13#include <dm.h>
14#include <errno.h>
15#include <log.h>
16#include <net.h>
17#include <linux/delay.h>
18#include <linux/mii.h>
19#include <malloc.h>
20#include <memalign.h>
21#include <usb.h>
22
23#include "usb_ether.h"
24
25#define MCS7830_BASE_NAME "mcs"
26
27#define USBCALL_TIMEOUT 1000
28#define LINKSTATUS_TIMEOUT 5000
29#define LINKSTATUS_TIMEOUT_RES 50
30
31#define MCS7830_RX_URB_SIZE 2048
32
33
34#define MCS7830_WR_BREQ 0x0d
35#define MCS7830_RD_BREQ 0x0e
36
37
38struct mcs7830_regs {
39 uint8_t multicast_hashes[8];
40 uint8_t packet_gap[2];
41 uint8_t phy_data[2];
42 uint8_t phy_command[2];
43 uint8_t configuration;
44 uint8_t ether_address[6];
45 uint8_t frame_drop_count;
46 uint8_t pause_threshold;
47};
48#define REG_MULTICAST_HASH offsetof(struct mcs7830_regs, multicast_hashes)
49#define REG_PHY_DATA offsetof(struct mcs7830_regs, phy_data)
50#define REG_PHY_CMD offsetof(struct mcs7830_regs, phy_command)
51#define REG_CONFIG offsetof(struct mcs7830_regs, configuration)
52#define REG_ETHER_ADDR offsetof(struct mcs7830_regs, ether_address)
53#define REG_FRAME_DROP_COUNTER offsetof(struct mcs7830_regs, frame_drop_count)
54#define REG_PAUSE_THRESHOLD offsetof(struct mcs7830_regs, pause_threshold)
55
56
57#define PHY_CMD1_READ 0x40
58#define PHY_CMD1_WRITE 0x20
59#define PHY_CMD1_PHYADDR 0x01
60
61#define PHY_CMD2_PEND 0x80
62#define PHY_CMD2_READY 0x40
63
64#define CONF_CFG 0x80
65#define CONF_SPEED100 0x40
66#define CONF_FDX_ENABLE 0x20
67#define CONF_RXENABLE 0x10
68#define CONF_TXENABLE 0x08
69#define CONF_SLEEPMODE 0x04
70#define CONF_ALLMULTICAST 0x02
71#define CONF_PROMISCUOUS 0x01
72
73#define PAUSE_THRESHOLD_DEFAULT 0
74
75
76#define STAT_RX_FRAME_CORRECT 0x20
77#define STAT_RX_LARGE_FRAME 0x10
78#define STAT_RX_CRC_ERROR 0x08
79#define STAT_RX_ALIGNMENT_ERROR 0x04
80#define STAT_RX_LENGTH_ERROR 0x02
81#define STAT_RX_SHORT_FRAME 0x01
82
83
84
85
86
87
88struct mcs7830_private {
89#ifdef CONFIG_DM_ETH
90 uint8_t rx_buf[MCS7830_RX_URB_SIZE];
91 struct ueth_data ueth;
92#endif
93 uint8_t config;
94 uint8_t mchash[8];
95};
96
97
98
99
100
101
102
103
104
105static int mcs7830_read_reg(struct usb_device *udev, uint8_t idx,
106 uint16_t size, void *data)
107{
108 int len;
109 ALLOC_CACHE_ALIGN_BUFFER(uint8_t, buf, size);
110
111 debug("%s() idx=0x%04X sz=%d\n", __func__, idx, size);
112
113 len = usb_control_msg(udev,
114 usb_rcvctrlpipe(udev, 0),
115 MCS7830_RD_BREQ,
116 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
117 0, idx, buf, size,
118 USBCALL_TIMEOUT);
119 if (len != size) {
120 debug("%s() len=%d != sz=%d\n", __func__, len, size);
121 return -EIO;
122 }
123 memcpy(data, buf, size);
124 return 0;
125}
126
127
128
129
130
131
132
133
134
135static int mcs7830_write_reg(struct usb_device *udev, uint8_t idx,
136 uint16_t size, void *data)
137{
138 int len;
139 ALLOC_CACHE_ALIGN_BUFFER(uint8_t, buf, size);
140
141 debug("%s() idx=0x%04X sz=%d\n", __func__, idx, size);
142
143 memcpy(buf, data, size);
144 len = usb_control_msg(udev,
145 usb_sndctrlpipe(udev, 0),
146 MCS7830_WR_BREQ,
147 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
148 0, idx, buf, size,
149 USBCALL_TIMEOUT);
150 if (len != size) {
151 debug("%s() len=%d != sz=%d\n", __func__, len, size);
152 return -EIO;
153 }
154 return 0;
155}
156
157
158
159
160
161
162
163
164static int mcs7830_phy_emit_wait(struct usb_device *udev,
165 uint8_t rwflag, uint8_t index)
166{
167 int rc;
168 int retry;
169 uint8_t cmd[2];
170
171
172 cmd[0] = rwflag | PHY_CMD1_PHYADDR;
173 cmd[1] = PHY_CMD2_PEND | (index & 0x1f);
174 rc = mcs7830_write_reg(udev, REG_PHY_CMD, sizeof(cmd), cmd);
175 if (rc < 0)
176 return rc;
177
178
179 retry = 10;
180 do {
181 rc = mcs7830_read_reg(udev, REG_PHY_CMD, sizeof(cmd), cmd);
182 if (rc < 0)
183 return rc;
184 if (cmd[1] & PHY_CMD2_READY)
185 return 0;
186 if (!retry--)
187 return -ETIMEDOUT;
188 mdelay(1);
189 } while (1);
190
191}
192
193
194
195
196
197
198
199static int mcs7830_read_phy(struct usb_device *udev, uint8_t index)
200{
201 int rc;
202 uint16_t val;
203
204
205 rc = mcs7830_phy_emit_wait(udev, PHY_CMD1_READ, index);
206 if (rc < 0)
207 return rc;
208
209
210 rc = mcs7830_read_reg(udev, REG_PHY_DATA, sizeof(val), &val);
211 if (rc < 0)
212 return rc;
213 rc = le16_to_cpu(val);
214 debug("%s(%d) => 0x%04X\n", __func__, index, rc);
215 return rc;
216}
217
218
219
220
221
222
223
224
225static int mcs7830_write_phy(struct usb_device *udev, uint8_t index,
226 uint16_t val)
227{
228 int rc;
229
230 debug("%s(%d, 0x%04X)\n", __func__, index, val);
231
232
233 val = cpu_to_le16(val);
234 rc = mcs7830_write_reg(udev, REG_PHY_DATA, sizeof(val), &val);
235 if (rc < 0)
236 return rc;
237
238
239 rc = mcs7830_phy_emit_wait(udev, PHY_CMD1_WRITE, index);
240 if (rc < 0)
241 return rc;
242
243 return 0;
244}
245
246
247
248
249
250
251
252
253
254
255static int mcs7830_write_config(struct usb_device *udev,
256 struct mcs7830_private *priv)
257{
258 int rc;
259
260 debug("%s()\n", __func__);
261
262 rc = mcs7830_write_reg(udev, REG_CONFIG,
263 sizeof(priv->config), &priv->config);
264 if (rc < 0) {
265 debug("writing config to adapter failed\n");
266 return rc;
267 }
268
269 return 0;
270}
271
272
273
274
275
276
277
278
279
280
281static int mcs7830_write_mchash(struct usb_device *udev,
282 struct mcs7830_private *priv)
283{
284 int rc;
285
286 debug("%s()\n", __func__);
287
288 rc = mcs7830_write_reg(udev, REG_MULTICAST_HASH,
289 sizeof(priv->mchash), &priv->mchash);
290 if (rc < 0) {
291 debug("writing multicast hash to adapter failed\n");
292 return rc;
293 }
294
295 return 0;
296}
297
298
299
300
301
302
303
304
305static int mcs7830_set_autoneg(struct usb_device *udev)
306{
307 int adv, flg;
308 int rc;
309
310 debug("%s()\n", __func__);
311
312
313
314
315
316
317
318
319
320 adv = ADVERTISE_PAUSE_CAP | ADVERTISE_ALL | ADVERTISE_CSMA;
321 rc = mcs7830_write_phy(udev, MII_ADVERTISE, adv);
322
323 flg = 0;
324 if (!rc)
325 rc = mcs7830_write_phy(udev, MII_BMCR, flg);
326
327 flg |= BMCR_ANENABLE;
328 if (!rc)
329 rc = mcs7830_write_phy(udev, MII_BMCR, flg);
330
331 flg |= BMCR_ANRESTART;
332 if (!rc)
333 rc = mcs7830_write_phy(udev, MII_BMCR, flg);
334
335 return rc;
336}
337
338
339
340
341
342
343
344
345
346static int mcs7830_get_rev(struct usb_device *udev)
347{
348 uint8_t buf[2];
349 int rc;
350 int rev;
351
352
353 rc = mcs7830_read_reg(udev, REG_FRAME_DROP_COUNTER, sizeof(buf), buf);
354 if (rc < 0)
355 rev = 1;
356 else
357 rev = 2;
358 debug("%s() rc=%d, rev=%d\n", __func__, rc, rev);
359 return rev;
360}
361
362
363
364
365
366
367
368
369
370static int mcs7830_apply_fixup(struct usb_device *udev)
371{
372 int rev;
373 int i;
374 uint8_t thr;
375
376 rev = mcs7830_get_rev(udev);
377 debug("%s() rev=%d\n", __func__, rev);
378
379
380
381
382
383
384 if (rev == 2) {
385 debug("%s: applying rev C fixup\n", __func__);
386 thr = PAUSE_THRESHOLD_DEFAULT;
387 for (i = 0; i < 2; i++) {
388 (void)mcs7830_write_reg(udev, REG_PAUSE_THRESHOLD,
389 sizeof(thr), &thr);
390 mdelay(1);
391 }
392 }
393
394 return 0;
395}
396
397
398
399
400
401
402
403
404
405
406static int mcs7830_basic_reset(struct usb_device *udev,
407 struct mcs7830_private *priv)
408{
409 int rc;
410
411 debug("%s()\n", __func__);
412
413
414
415
416
417
418 priv->config = CONF_TXENABLE;
419 priv->config |= CONF_ALLMULTICAST;
420
421 rc = mcs7830_set_autoneg(udev);
422 if (rc < 0) {
423 pr_err("setting autoneg failed\n");
424 return rc;
425 }
426
427 rc = mcs7830_write_mchash(udev, priv);
428 if (rc < 0) {
429 pr_err("failed to set multicast hash\n");
430 return rc;
431 }
432
433 rc = mcs7830_write_config(udev, priv);
434 if (rc < 0) {
435 pr_err("failed to set configuration\n");
436 return rc;
437 }
438
439 rc = mcs7830_apply_fixup(udev);
440 if (rc < 0) {
441 pr_err("fixup application failed\n");
442 return rc;
443 }
444
445 return 0;
446}
447
448
449
450
451
452
453
454
455
456
457static int mcs7830_read_mac(struct usb_device *udev, unsigned char enetaddr[])
458{
459 int rc;
460 uint8_t buf[ETH_ALEN];
461
462 debug("%s()\n", __func__);
463
464 rc = mcs7830_read_reg(udev, REG_ETHER_ADDR, ETH_ALEN, buf);
465 if (rc < 0) {
466 debug("reading MAC from adapter failed\n");
467 return rc;
468 }
469
470 memcpy(enetaddr, buf, ETH_ALEN);
471 return 0;
472}
473
474static int mcs7830_write_mac_common(struct usb_device *udev,
475 unsigned char enetaddr[])
476{
477 int rc;
478
479 debug("%s()\n", __func__);
480
481 rc = mcs7830_write_reg(udev, REG_ETHER_ADDR, ETH_ALEN, enetaddr);
482 if (rc < 0) {
483 debug("writing MAC to adapter failed\n");
484 return rc;
485 }
486 return 0;
487}
488
489static int mcs7830_init_common(struct usb_device *udev)
490{
491 int timeout;
492 int have_link;
493
494 debug("%s()\n", __func__);
495
496 timeout = 0;
497 do {
498 have_link = mcs7830_read_phy(udev, MII_BMSR) & BMSR_LSTATUS;
499 if (have_link)
500 break;
501 udelay(LINKSTATUS_TIMEOUT_RES * 1000);
502 timeout += LINKSTATUS_TIMEOUT_RES;
503 } while (timeout < LINKSTATUS_TIMEOUT);
504 if (!have_link) {
505 debug("ethernet link is down\n");
506 return -ETIMEDOUT;
507 }
508 return 0;
509}
510
511static int mcs7830_send_common(struct ueth_data *ueth, void *packet,
512 int length)
513{
514 struct usb_device *udev = ueth->pusb_dev;
515 int rc;
516 int gotlen;
517
518 ALLOC_CACHE_ALIGN_BUFFER(uint8_t, buf, PKTSIZE + sizeof(uint8_t));
519
520 memcpy(buf, packet, length);
521 rc = usb_bulk_msg(udev,
522 usb_sndbulkpipe(udev, ueth->ep_out),
523 &buf[0], length, &gotlen,
524 USBCALL_TIMEOUT);
525 debug("%s() TX want len %d, got len %d, rc %d\n",
526 __func__, length, gotlen, rc);
527 return rc;
528}
529
530static int mcs7830_recv_common(struct ueth_data *ueth, uint8_t *buf)
531{
532 int rc, wantlen, gotlen;
533 uint8_t sts;
534
535 debug("%s()\n", __func__);
536
537
538 wantlen = MCS7830_RX_URB_SIZE;
539 rc = usb_bulk_msg(ueth->pusb_dev,
540 usb_rcvbulkpipe(ueth->pusb_dev, ueth->ep_in),
541 &buf[0], wantlen, &gotlen,
542 USBCALL_TIMEOUT);
543 debug("%s() RX want len %d, got len %d, rc %d\n",
544 __func__, wantlen, gotlen, rc);
545 if (rc != 0) {
546 pr_err("RX: failed to receive\n");
547 return rc;
548 }
549 if (gotlen > wantlen) {
550 pr_err("RX: got too many bytes (%d)\n", gotlen);
551 return -EIO;
552 }
553
554
555
556
557
558 if (gotlen < sizeof(sts))
559 return -EIO;
560 gotlen -= sizeof(sts);
561 sts = buf[gotlen];
562
563 if (sts == STAT_RX_FRAME_CORRECT) {
564 debug("%s() got a frame, len=%d\n", __func__, gotlen);
565 return gotlen;
566 }
567
568 debug("RX: frame error (sts 0x%02X, %s %s %s %s %s)\n",
569 sts,
570 (sts & STAT_RX_LARGE_FRAME) ? "large" : "-",
571 (sts & STAT_RX_LENGTH_ERROR) ? "length" : "-",
572 (sts & STAT_RX_SHORT_FRAME) ? "short" : "-",
573 (sts & STAT_RX_CRC_ERROR) ? "crc" : "-",
574 (sts & STAT_RX_ALIGNMENT_ERROR) ? "align" : "-");
575 return -EIO;
576}
577
578#ifndef CONFIG_DM_ETH
579
580
581
582
583
584
585
586
587
588
589static int mcs7830_init(struct eth_device *eth, struct bd_info *bd)
590{
591 struct ueth_data *dev = eth->priv;
592
593 return mcs7830_init_common(dev->pusb_dev);
594}
595
596
597
598
599
600
601
602
603
604
605static int mcs7830_send(struct eth_device *eth, void *packet, int length)
606{
607 struct ueth_data *dev = eth->priv;
608
609 return mcs7830_send_common(dev, packet, length);
610}
611
612
613
614
615
616
617
618
619
620static int mcs7830_recv(struct eth_device *eth)
621{
622 ALLOC_CACHE_ALIGN_BUFFER(uint8_t, buf, MCS7830_RX_URB_SIZE);
623 struct ueth_data *ueth = eth->priv;
624 int len;
625
626 len = mcs7830_recv_common(ueth, buf);
627 if (len >= 0) {
628 net_process_received_packet(buf, len);
629 return 0;
630 }
631
632 return len;
633}
634
635
636
637
638
639
640
641
642
643static void mcs7830_halt(struct eth_device *eth)
644{
645 debug("%s()\n", __func__);
646}
647
648
649
650
651
652
653
654
655
656
657static int mcs7830_write_mac(struct eth_device *eth)
658{
659 struct ueth_data *ueth = eth->priv;
660
661 return mcs7830_write_mac_common(ueth->pusb_dev, eth->enetaddr);
662}
663
664
665
666
667
668
669
670static int mcs7830_iface_idx;
671
672
673
674
675
676
677
678
679void mcs7830_eth_before_probe(void)
680{
681 mcs7830_iface_idx = 0;
682}
683
684
685
686
687
688
689
690
691
692
693
694
695struct mcs7830_dongle {
696 uint16_t vendor;
697 uint16_t product;
698};
699
700
701
702
703static const struct mcs7830_dongle mcs7830_dongles[] = {
704 { 0x9710, 0x7832, },
705 { 0x9710, 0x7830, },
706 { 0x9710, 0x7730, },
707 { 0x0df6, 0x0021, },
708};
709
710
711
712
713
714
715
716
717
718
719
720
721int mcs7830_eth_probe(struct usb_device *dev, unsigned int ifnum,
722 struct ueth_data *ss)
723{
724 struct usb_interface *iface;
725 struct usb_interface_descriptor *iface_desc;
726 int i;
727 struct mcs7830_private *priv;
728 int ep_in_found, ep_out_found, ep_intr_found;
729
730 debug("%s()\n", __func__);
731
732
733 iface = &dev->config.if_desc[ifnum];
734 iface_desc = &iface->desc;
735 for (i = 0; i < ARRAY_SIZE(mcs7830_dongles); i++) {
736 if (dev->descriptor.idVendor == mcs7830_dongles[i].vendor &&
737 dev->descriptor.idProduct == mcs7830_dongles[i].product)
738 break;
739 }
740 if (i == ARRAY_SIZE(mcs7830_dongles))
741 return 0;
742 debug("detected USB ethernet device: %04X:%04X\n",
743 dev->descriptor.idVendor, dev->descriptor.idProduct);
744
745
746 priv = calloc(1, sizeof(*priv));
747 if (!priv)
748 return 0;
749
750
751 memset(ss, 0, sizeof(*ss));
752 ss->ifnum = ifnum;
753 ss->pusb_dev = dev;
754 ss->subclass = iface_desc->bInterfaceSubClass;
755 ss->protocol = iface_desc->bInterfaceProtocol;
756 ss->dev_priv = priv;
757
758
759
760
761
762 ep_in_found = ep_out_found = ep_intr_found = 0;
763 for (i = 0; i < iface_desc->bNumEndpoints; i++) {
764 uint8_t eptype, epaddr;
765 bool is_input;
766
767 eptype = iface->ep_desc[i].bmAttributes;
768 eptype &= USB_ENDPOINT_XFERTYPE_MASK;
769
770 epaddr = iface->ep_desc[i].bEndpointAddress;
771 is_input = epaddr & USB_DIR_IN;
772 epaddr &= USB_ENDPOINT_NUMBER_MASK;
773
774 if (eptype == USB_ENDPOINT_XFER_BULK) {
775 if (is_input && !ep_in_found) {
776 ss->ep_in = epaddr;
777 ep_in_found++;
778 }
779 if (!is_input && !ep_out_found) {
780 ss->ep_out = epaddr;
781 ep_out_found++;
782 }
783 }
784
785 if (eptype == USB_ENDPOINT_XFER_INT) {
786 if (is_input && !ep_intr_found) {
787 ss->ep_int = epaddr;
788 ss->irqinterval = iface->ep_desc[i].bInterval;
789 ep_intr_found++;
790 }
791 }
792 }
793 debug("endpoints: in %d, out %d, intr %d\n",
794 ss->ep_in, ss->ep_out, ss->ep_int);
795
796
797 if (usb_set_interface(dev, iface_desc->bInterfaceNumber, 0) ||
798 !ss->ep_in || !ss->ep_out || !ss->ep_int) {
799 debug("device probe incomplete\n");
800 return 0;
801 }
802
803 dev->privptr = ss;
804 return 1;
805}
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820int mcs7830_eth_get_info(struct usb_device *dev, struct ueth_data *ss,
821 struct eth_device *eth)
822{
823 debug("%s()\n", __func__);
824 if (!eth) {
825 debug("%s: missing parameter.\n", __func__);
826 return 0;
827 }
828
829 snprintf(eth->name, sizeof(eth->name), "%s%d",
830 MCS7830_BASE_NAME, mcs7830_iface_idx++);
831 eth->init = mcs7830_init;
832 eth->send = mcs7830_send;
833 eth->recv = mcs7830_recv;
834 eth->halt = mcs7830_halt;
835 eth->write_hwaddr = mcs7830_write_mac;
836 eth->priv = ss;
837
838 if (mcs7830_basic_reset(ss->pusb_dev, ss->dev_priv))
839 return 0;
840
841 if (mcs7830_read_mac(ss->pusb_dev, eth->enetaddr))
842 return 0;
843 debug("MAC %pM\n", eth->enetaddr);
844
845 return 1;
846}
847#endif
848
849
850#ifdef CONFIG_DM_ETH
851static int mcs7830_eth_start(struct udevice *dev)
852{
853 struct usb_device *udev = dev_get_parent_priv(dev);
854
855 return mcs7830_init_common(udev);
856}
857
858void mcs7830_eth_stop(struct udevice *dev)
859{
860 debug("** %s()\n", __func__);
861}
862
863int mcs7830_eth_send(struct udevice *dev, void *packet, int length)
864{
865 struct mcs7830_private *priv = dev_get_priv(dev);
866 struct ueth_data *ueth = &priv->ueth;
867
868 return mcs7830_send_common(ueth, packet, length);
869}
870
871int mcs7830_eth_recv(struct udevice *dev, int flags, uchar **packetp)
872{
873 struct mcs7830_private *priv = dev_get_priv(dev);
874 struct ueth_data *ueth = &priv->ueth;
875 int len;
876
877 len = mcs7830_recv_common(ueth, priv->rx_buf);
878 *packetp = priv->rx_buf;
879
880 return len;
881}
882
883static int mcs7830_free_pkt(struct udevice *dev, uchar *packet, int packet_len)
884{
885 struct mcs7830_private *priv = dev_get_priv(dev);
886
887 packet_len = ALIGN(packet_len, 4);
888 usb_ether_advance_rxbuf(&priv->ueth, sizeof(u32) + packet_len);
889
890 return 0;
891}
892
893int mcs7830_write_hwaddr(struct udevice *dev)
894{
895 struct usb_device *udev = dev_get_parent_priv(dev);
896 struct eth_pdata *pdata = dev_get_plat(dev);
897
898 return mcs7830_write_mac_common(udev, pdata->enetaddr);
899}
900
901static int mcs7830_eth_probe(struct udevice *dev)
902{
903 struct usb_device *udev = dev_get_parent_priv(dev);
904 struct mcs7830_private *priv = dev_get_priv(dev);
905 struct eth_pdata *pdata = dev_get_plat(dev);
906 struct ueth_data *ueth = &priv->ueth;
907
908 if (mcs7830_basic_reset(udev, priv))
909 return 0;
910
911 if (mcs7830_read_mac(udev, pdata->enetaddr))
912 return 0;
913
914 return usb_ether_register(dev, ueth, MCS7830_RX_URB_SIZE);
915}
916
917static const struct eth_ops mcs7830_eth_ops = {
918 .start = mcs7830_eth_start,
919 .send = mcs7830_eth_send,
920 .recv = mcs7830_eth_recv,
921 .free_pkt = mcs7830_free_pkt,
922 .stop = mcs7830_eth_stop,
923 .write_hwaddr = mcs7830_write_hwaddr,
924};
925
926U_BOOT_DRIVER(mcs7830_eth) = {
927 .name = "mcs7830_eth",
928 .id = UCLASS_ETH,
929 .probe = mcs7830_eth_probe,
930 .ops = &mcs7830_eth_ops,
931 .priv_auto = sizeof(struct mcs7830_private),
932 .plat_auto = sizeof(struct eth_pdata),
933 .flags = DM_FLAG_ALLOC_PRIV_DMA,
934};
935
936static const struct usb_device_id mcs7830_eth_id_table[] = {
937 { USB_DEVICE(0x9710, 0x7832) },
938 { USB_DEVICE(0x9710, 0x7830), },
939 { USB_DEVICE(0x9710, 0x7730), },
940 { USB_DEVICE(0x0df6, 0x0021), },
941 { }
942};
943
944U_BOOT_USB_DEVICE(mcs7830_eth, mcs7830_eth_id_table);
945#endif
946