diff options
Diffstat (limited to 'drivers/net/wan/pc300_drv.c')
-rw-r--r-- | drivers/net/wan/pc300_drv.c | 87 |
1 files changed, 44 insertions, 43 deletions
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c index 3e7753b10717..a3e65d1bc19b 100644 --- a/drivers/net/wan/pc300_drv.c +++ b/drivers/net/wan/pc300_drv.c | |||
@@ -291,6 +291,7 @@ static uclong detect_ram(pc300_t *); | |||
291 | static void plx_init(pc300_t *); | 291 | static void plx_init(pc300_t *); |
292 | static void cpc_trace(struct net_device *, struct sk_buff *, char); | 292 | static void cpc_trace(struct net_device *, struct sk_buff *, char); |
293 | static int cpc_attach(struct net_device *, unsigned short, unsigned short); | 293 | static int cpc_attach(struct net_device *, unsigned short, unsigned short); |
294 | static int cpc_close(struct net_device *dev); | ||
294 | 295 | ||
295 | #ifdef CONFIG_PC300_MLPPP | 296 | #ifdef CONFIG_PC300_MLPPP |
296 | void cpc_tty_init(pc300dev_t * dev); | 297 | void cpc_tty_init(pc300dev_t * dev); |
@@ -437,7 +438,7 @@ static void rx_dma_buf_check(pc300_t * card, int ch) | |||
437 | printk("\n"); | 438 | printk("\n"); |
438 | } | 439 | } |
439 | 440 | ||
440 | int dma_get_rx_frame_size(pc300_t * card, int ch) | 441 | static int dma_get_rx_frame_size(pc300_t * card, int ch) |
441 | { | 442 | { |
442 | volatile pcsca_bd_t __iomem *ptdescr; | 443 | volatile pcsca_bd_t __iomem *ptdescr; |
443 | ucshort first_bd = card->chan[ch].rx_first_bd; | 444 | ucshort first_bd = card->chan[ch].rx_first_bd; |
@@ -462,7 +463,7 @@ int dma_get_rx_frame_size(pc300_t * card, int ch) | |||
462 | * dma_buf_write: writes a frame to the Tx DMA buffers | 463 | * dma_buf_write: writes a frame to the Tx DMA buffers |
463 | * NOTE: this function writes one frame at a time. | 464 | * NOTE: this function writes one frame at a time. |
464 | */ | 465 | */ |
465 | int dma_buf_write(pc300_t * card, int ch, ucchar * ptdata, int len) | 466 | static int dma_buf_write(pc300_t * card, int ch, ucchar * ptdata, int len) |
466 | { | 467 | { |
467 | int i, nchar; | 468 | int i, nchar; |
468 | volatile pcsca_bd_t __iomem *ptdescr; | 469 | volatile pcsca_bd_t __iomem *ptdescr; |
@@ -503,7 +504,7 @@ int dma_buf_write(pc300_t * card, int ch, ucchar * ptdata, int len) | |||
503 | * dma_buf_read: reads a frame from the Rx DMA buffers | 504 | * dma_buf_read: reads a frame from the Rx DMA buffers |
504 | * NOTE: this function reads one frame at a time. | 505 | * NOTE: this function reads one frame at a time. |
505 | */ | 506 | */ |
506 | int dma_buf_read(pc300_t * card, int ch, struct sk_buff *skb) | 507 | static int dma_buf_read(pc300_t * card, int ch, struct sk_buff *skb) |
507 | { | 508 | { |
508 | int nchar; | 509 | int nchar; |
509 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 510 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
@@ -560,7 +561,7 @@ int dma_buf_read(pc300_t * card, int ch, struct sk_buff *skb) | |||
560 | return (rcvd); | 561 | return (rcvd); |
561 | } | 562 | } |
562 | 563 | ||
563 | void tx_dma_stop(pc300_t * card, int ch) | 564 | static void tx_dma_stop(pc300_t * card, int ch) |
564 | { | 565 | { |
565 | void __iomem *scabase = card->hw.scabase; | 566 | void __iomem *scabase = card->hw.scabase; |
566 | ucchar drr_ena_bit = 1 << (5 + 2 * ch); | 567 | ucchar drr_ena_bit = 1 << (5 + 2 * ch); |
@@ -571,7 +572,7 @@ void tx_dma_stop(pc300_t * card, int ch) | |||
571 | cpc_writeb(scabase + DRR, drr_rst_bit & ~drr_ena_bit); | 572 | cpc_writeb(scabase + DRR, drr_rst_bit & ~drr_ena_bit); |
572 | } | 573 | } |
573 | 574 | ||
574 | void rx_dma_stop(pc300_t * card, int ch) | 575 | static void rx_dma_stop(pc300_t * card, int ch) |
575 | { | 576 | { |
576 | void __iomem *scabase = card->hw.scabase; | 577 | void __iomem *scabase = card->hw.scabase; |
577 | ucchar drr_ena_bit = 1 << (4 + 2 * ch); | 578 | ucchar drr_ena_bit = 1 << (4 + 2 * ch); |
@@ -582,7 +583,7 @@ void rx_dma_stop(pc300_t * card, int ch) | |||
582 | cpc_writeb(scabase + DRR, drr_rst_bit & ~drr_ena_bit); | 583 | cpc_writeb(scabase + DRR, drr_rst_bit & ~drr_ena_bit); |
583 | } | 584 | } |
584 | 585 | ||
585 | void rx_dma_start(pc300_t * card, int ch) | 586 | static void rx_dma_start(pc300_t * card, int ch) |
586 | { | 587 | { |
587 | void __iomem *scabase = card->hw.scabase; | 588 | void __iomem *scabase = card->hw.scabase; |
588 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 589 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
@@ -607,7 +608,7 @@ void rx_dma_start(pc300_t * card, int ch) | |||
607 | /*************************/ | 608 | /*************************/ |
608 | /*** FALC Routines ***/ | 609 | /*** FALC Routines ***/ |
609 | /*************************/ | 610 | /*************************/ |
610 | void falc_issue_cmd(pc300_t * card, int ch, ucchar cmd) | 611 | static void falc_issue_cmd(pc300_t * card, int ch, ucchar cmd) |
611 | { | 612 | { |
612 | void __iomem *falcbase = card->hw.falcbase; | 613 | void __iomem *falcbase = card->hw.falcbase; |
613 | unsigned long i = 0; | 614 | unsigned long i = 0; |
@@ -622,7 +623,7 @@ void falc_issue_cmd(pc300_t * card, int ch, ucchar cmd) | |||
622 | cpc_writeb(falcbase + F_REG(CMDR, ch), cmd); | 623 | cpc_writeb(falcbase + F_REG(CMDR, ch), cmd); |
623 | } | 624 | } |
624 | 625 | ||
625 | void falc_intr_enable(pc300_t * card, int ch) | 626 | static void falc_intr_enable(pc300_t * card, int ch) |
626 | { | 627 | { |
627 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 628 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
628 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 629 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -672,7 +673,7 @@ void falc_intr_enable(pc300_t * card, int ch) | |||
672 | } | 673 | } |
673 | } | 674 | } |
674 | 675 | ||
675 | void falc_open_timeslot(pc300_t * card, int ch, int timeslot) | 676 | static void falc_open_timeslot(pc300_t * card, int ch, int timeslot) |
676 | { | 677 | { |
677 | void __iomem *falcbase = card->hw.falcbase; | 678 | void __iomem *falcbase = card->hw.falcbase; |
678 | ucchar tshf = card->chan[ch].falc.offset; | 679 | ucchar tshf = card->chan[ch].falc.offset; |
@@ -688,7 +689,7 @@ void falc_open_timeslot(pc300_t * card, int ch, int timeslot) | |||
688 | (0x80 >> (timeslot & 0x07))); | 689 | (0x80 >> (timeslot & 0x07))); |
689 | } | 690 | } |
690 | 691 | ||
691 | void falc_close_timeslot(pc300_t * card, int ch, int timeslot) | 692 | static void falc_close_timeslot(pc300_t * card, int ch, int timeslot) |
692 | { | 693 | { |
693 | void __iomem *falcbase = card->hw.falcbase; | 694 | void __iomem *falcbase = card->hw.falcbase; |
694 | ucchar tshf = card->chan[ch].falc.offset; | 695 | ucchar tshf = card->chan[ch].falc.offset; |
@@ -704,7 +705,7 @@ void falc_close_timeslot(pc300_t * card, int ch, int timeslot) | |||
704 | ~(0x80 >> (timeslot & 0x07))); | 705 | ~(0x80 >> (timeslot & 0x07))); |
705 | } | 706 | } |
706 | 707 | ||
707 | void falc_close_all_timeslots(pc300_t * card, int ch) | 708 | static void falc_close_all_timeslots(pc300_t * card, int ch) |
708 | { | 709 | { |
709 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 710 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
710 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 711 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -726,7 +727,7 @@ void falc_close_all_timeslots(pc300_t * card, int ch) | |||
726 | } | 727 | } |
727 | } | 728 | } |
728 | 729 | ||
729 | void falc_open_all_timeslots(pc300_t * card, int ch) | 730 | static void falc_open_all_timeslots(pc300_t * card, int ch) |
730 | { | 731 | { |
731 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 732 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
732 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 733 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -758,7 +759,7 @@ void falc_open_all_timeslots(pc300_t * card, int ch) | |||
758 | } | 759 | } |
759 | } | 760 | } |
760 | 761 | ||
761 | void falc_init_timeslot(pc300_t * card, int ch) | 762 | static void falc_init_timeslot(pc300_t * card, int ch) |
762 | { | 763 | { |
763 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 764 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
764 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 765 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -776,7 +777,7 @@ void falc_init_timeslot(pc300_t * card, int ch) | |||
776 | } | 777 | } |
777 | } | 778 | } |
778 | 779 | ||
779 | void falc_enable_comm(pc300_t * card, int ch) | 780 | static void falc_enable_comm(pc300_t * card, int ch) |
780 | { | 781 | { |
781 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 782 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
782 | falc_t *pfalc = (falc_t *) & chan->falc; | 783 | falc_t *pfalc = (falc_t *) & chan->falc; |
@@ -792,7 +793,7 @@ void falc_enable_comm(pc300_t * card, int ch) | |||
792 | ~((CPLD_REG1_FALC_DCD | CPLD_REG1_FALC_CTS) << (2 * ch))); | 793 | ~((CPLD_REG1_FALC_DCD | CPLD_REG1_FALC_CTS) << (2 * ch))); |
793 | } | 794 | } |
794 | 795 | ||
795 | void falc_disable_comm(pc300_t * card, int ch) | 796 | static void falc_disable_comm(pc300_t * card, int ch) |
796 | { | 797 | { |
797 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 798 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
798 | falc_t *pfalc = (falc_t *) & chan->falc; | 799 | falc_t *pfalc = (falc_t *) & chan->falc; |
@@ -806,7 +807,7 @@ void falc_disable_comm(pc300_t * card, int ch) | |||
806 | ((CPLD_REG1_FALC_DCD | CPLD_REG1_FALC_CTS) << (2 * ch))); | 807 | ((CPLD_REG1_FALC_DCD | CPLD_REG1_FALC_CTS) << (2 * ch))); |
807 | } | 808 | } |
808 | 809 | ||
809 | void falc_init_t1(pc300_t * card, int ch) | 810 | static void falc_init_t1(pc300_t * card, int ch) |
810 | { | 811 | { |
811 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 812 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
812 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 813 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -975,7 +976,7 @@ void falc_init_t1(pc300_t * card, int ch) | |||
975 | falc_close_all_timeslots(card, ch); | 976 | falc_close_all_timeslots(card, ch); |
976 | } | 977 | } |
977 | 978 | ||
978 | void falc_init_e1(pc300_t * card, int ch) | 979 | static void falc_init_e1(pc300_t * card, int ch) |
979 | { | 980 | { |
980 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 981 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
981 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 982 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -1155,7 +1156,7 @@ void falc_init_e1(pc300_t * card, int ch) | |||
1155 | falc_close_all_timeslots(card, ch); | 1156 | falc_close_all_timeslots(card, ch); |
1156 | } | 1157 | } |
1157 | 1158 | ||
1158 | void falc_init_hdlc(pc300_t * card, int ch) | 1159 | static void falc_init_hdlc(pc300_t * card, int ch) |
1159 | { | 1160 | { |
1160 | void __iomem *falcbase = card->hw.falcbase; | 1161 | void __iomem *falcbase = card->hw.falcbase; |
1161 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 1162 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
@@ -1181,7 +1182,7 @@ void falc_init_hdlc(pc300_t * card, int ch) | |||
1181 | falc_intr_enable(card, ch); | 1182 | falc_intr_enable(card, ch); |
1182 | } | 1183 | } |
1183 | 1184 | ||
1184 | void te_config(pc300_t * card, int ch) | 1185 | static void te_config(pc300_t * card, int ch) |
1185 | { | 1186 | { |
1186 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 1187 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
1187 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 1188 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -1241,7 +1242,7 @@ void te_config(pc300_t * card, int ch) | |||
1241 | CPC_UNLOCK(card, flags); | 1242 | CPC_UNLOCK(card, flags); |
1242 | } | 1243 | } |
1243 | 1244 | ||
1244 | void falc_check_status(pc300_t * card, int ch, unsigned char frs0) | 1245 | static void falc_check_status(pc300_t * card, int ch, unsigned char frs0) |
1245 | { | 1246 | { |
1246 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 1247 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
1247 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 1248 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -1397,7 +1398,7 @@ void falc_check_status(pc300_t * card, int ch, unsigned char frs0) | |||
1397 | } | 1398 | } |
1398 | } | 1399 | } |
1399 | 1400 | ||
1400 | void falc_update_stats(pc300_t * card, int ch) | 1401 | static void falc_update_stats(pc300_t * card, int ch) |
1401 | { | 1402 | { |
1402 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 1403 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
1403 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 1404 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -1450,7 +1451,7 @@ void falc_update_stats(pc300_t * card, int ch) | |||
1450 | * the synchronizer and then sent to the system interface. | 1451 | * the synchronizer and then sent to the system interface. |
1451 | *---------------------------------------------------------------------------- | 1452 | *---------------------------------------------------------------------------- |
1452 | */ | 1453 | */ |
1453 | void falc_remote_loop(pc300_t * card, int ch, int loop_on) | 1454 | static void falc_remote_loop(pc300_t * card, int ch, int loop_on) |
1454 | { | 1455 | { |
1455 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 1456 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
1456 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 1457 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -1495,7 +1496,7 @@ void falc_remote_loop(pc300_t * card, int ch, int loop_on) | |||
1495 | * coding must be identical. | 1496 | * coding must be identical. |
1496 | *---------------------------------------------------------------------------- | 1497 | *---------------------------------------------------------------------------- |
1497 | */ | 1498 | */ |
1498 | void falc_local_loop(pc300_t * card, int ch, int loop_on) | 1499 | static void falc_local_loop(pc300_t * card, int ch, int loop_on) |
1499 | { | 1500 | { |
1500 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 1501 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
1501 | falc_t *pfalc = (falc_t *) & chan->falc; | 1502 | falc_t *pfalc = (falc_t *) & chan->falc; |
@@ -1522,7 +1523,7 @@ void falc_local_loop(pc300_t * card, int ch, int loop_on) | |||
1522 | * looped. They are originated by the FALC-LH transmitter. | 1523 | * looped. They are originated by the FALC-LH transmitter. |
1523 | *---------------------------------------------------------------------------- | 1524 | *---------------------------------------------------------------------------- |
1524 | */ | 1525 | */ |
1525 | void falc_payload_loop(pc300_t * card, int ch, int loop_on) | 1526 | static void falc_payload_loop(pc300_t * card, int ch, int loop_on) |
1526 | { | 1527 | { |
1527 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 1528 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
1528 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 1529 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -1576,7 +1577,7 @@ void falc_payload_loop(pc300_t * card, int ch, int loop_on) | |||
1576 | * Description: Turns XLU bit off in the proper register | 1577 | * Description: Turns XLU bit off in the proper register |
1577 | *---------------------------------------------------------------------------- | 1578 | *---------------------------------------------------------------------------- |
1578 | */ | 1579 | */ |
1579 | void turn_off_xlu(pc300_t * card, int ch) | 1580 | static void turn_off_xlu(pc300_t * card, int ch) |
1580 | { | 1581 | { |
1581 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 1582 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
1582 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 1583 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -1597,7 +1598,7 @@ void turn_off_xlu(pc300_t * card, int ch) | |||
1597 | * Description: Turns XLD bit off in the proper register | 1598 | * Description: Turns XLD bit off in the proper register |
1598 | *---------------------------------------------------------------------------- | 1599 | *---------------------------------------------------------------------------- |
1599 | */ | 1600 | */ |
1600 | void turn_off_xld(pc300_t * card, int ch) | 1601 | static void turn_off_xld(pc300_t * card, int ch) |
1601 | { | 1602 | { |
1602 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 1603 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
1603 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 1604 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -1619,7 +1620,7 @@ void turn_off_xld(pc300_t * card, int ch) | |||
1619 | * to generate a LOOP activation code over a T1/E1 line. | 1620 | * to generate a LOOP activation code over a T1/E1 line. |
1620 | *---------------------------------------------------------------------------- | 1621 | *---------------------------------------------------------------------------- |
1621 | */ | 1622 | */ |
1622 | void falc_generate_loop_up_code(pc300_t * card, int ch) | 1623 | static void falc_generate_loop_up_code(pc300_t * card, int ch) |
1623 | { | 1624 | { |
1624 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 1625 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
1625 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 1626 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -1652,7 +1653,7 @@ void falc_generate_loop_up_code(pc300_t * card, int ch) | |||
1652 | * to generate a LOOP deactivation code over a T1/E1 line. | 1653 | * to generate a LOOP deactivation code over a T1/E1 line. |
1653 | *---------------------------------------------------------------------------- | 1654 | *---------------------------------------------------------------------------- |
1654 | */ | 1655 | */ |
1655 | void falc_generate_loop_down_code(pc300_t * card, int ch) | 1656 | static void falc_generate_loop_down_code(pc300_t * card, int ch) |
1656 | { | 1657 | { |
1657 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 1658 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
1658 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 1659 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -1682,7 +1683,7 @@ void falc_generate_loop_down_code(pc300_t * card, int ch) | |||
1682 | * it on the reception side. | 1683 | * it on the reception side. |
1683 | *---------------------------------------------------------------------------- | 1684 | *---------------------------------------------------------------------------- |
1684 | */ | 1685 | */ |
1685 | void falc_pattern_test(pc300_t * card, int ch, unsigned int activate) | 1686 | static void falc_pattern_test(pc300_t * card, int ch, unsigned int activate) |
1686 | { | 1687 | { |
1687 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 1688 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
1688 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 1689 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -1729,7 +1730,7 @@ void falc_pattern_test(pc300_t * card, int ch, unsigned int activate) | |||
1729 | * Description: This routine returns the bit error counter value | 1730 | * Description: This routine returns the bit error counter value |
1730 | *---------------------------------------------------------------------------- | 1731 | *---------------------------------------------------------------------------- |
1731 | */ | 1732 | */ |
1732 | ucshort falc_pattern_test_error(pc300_t * card, int ch) | 1733 | static ucshort falc_pattern_test_error(pc300_t * card, int ch) |
1733 | { | 1734 | { |
1734 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; | 1735 | pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; |
1735 | falc_t *pfalc = (falc_t *) & chan->falc; | 1736 | falc_t *pfalc = (falc_t *) & chan->falc; |
@@ -1769,7 +1770,7 @@ cpc_trace(struct net_device *dev, struct sk_buff *skb_main, char rx_tx) | |||
1769 | netif_rx(skb); | 1770 | netif_rx(skb); |
1770 | } | 1771 | } |
1771 | 1772 | ||
1772 | void cpc_tx_timeout(struct net_device *dev) | 1773 | static void cpc_tx_timeout(struct net_device *dev) |
1773 | { | 1774 | { |
1774 | pc300dev_t *d = (pc300dev_t *) dev->priv; | 1775 | pc300dev_t *d = (pc300dev_t *) dev->priv; |
1775 | pc300ch_t *chan = (pc300ch_t *) d->chan; | 1776 | pc300ch_t *chan = (pc300ch_t *) d->chan; |
@@ -1797,7 +1798,7 @@ void cpc_tx_timeout(struct net_device *dev) | |||
1797 | netif_wake_queue(dev); | 1798 | netif_wake_queue(dev); |
1798 | } | 1799 | } |
1799 | 1800 | ||
1800 | int cpc_queue_xmit(struct sk_buff *skb, struct net_device *dev) | 1801 | static int cpc_queue_xmit(struct sk_buff *skb, struct net_device *dev) |
1801 | { | 1802 | { |
1802 | pc300dev_t *d = (pc300dev_t *) dev->priv; | 1803 | pc300dev_t *d = (pc300dev_t *) dev->priv; |
1803 | pc300ch_t *chan = (pc300ch_t *) d->chan; | 1804 | pc300ch_t *chan = (pc300ch_t *) d->chan; |
@@ -1880,7 +1881,7 @@ int cpc_queue_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1880 | return 0; | 1881 | return 0; |
1881 | } | 1882 | } |
1882 | 1883 | ||
1883 | void cpc_net_rx(struct net_device *dev) | 1884 | static void cpc_net_rx(struct net_device *dev) |
1884 | { | 1885 | { |
1885 | pc300dev_t *d = (pc300dev_t *) dev->priv; | 1886 | pc300dev_t *d = (pc300dev_t *) dev->priv; |
1886 | pc300ch_t *chan = (pc300ch_t *) d->chan; | 1887 | pc300ch_t *chan = (pc300ch_t *) d->chan; |
@@ -2403,7 +2404,7 @@ static irqreturn_t cpc_intr(int irq, void *dev_id, struct pt_regs *regs) | |||
2403 | return IRQ_HANDLED; | 2404 | return IRQ_HANDLED; |
2404 | } | 2405 | } |
2405 | 2406 | ||
2406 | void cpc_sca_status(pc300_t * card, int ch) | 2407 | static void cpc_sca_status(pc300_t * card, int ch) |
2407 | { | 2408 | { |
2408 | ucchar ilar; | 2409 | ucchar ilar; |
2409 | void __iomem *scabase = card->hw.scabase; | 2410 | void __iomem *scabase = card->hw.scabase; |
@@ -2495,7 +2496,7 @@ void cpc_sca_status(pc300_t * card, int ch) | |||
2495 | } | 2496 | } |
2496 | } | 2497 | } |
2497 | 2498 | ||
2498 | void cpc_falc_status(pc300_t * card, int ch) | 2499 | static void cpc_falc_status(pc300_t * card, int ch) |
2499 | { | 2500 | { |
2500 | pc300ch_t *chan = &card->chan[ch]; | 2501 | pc300ch_t *chan = &card->chan[ch]; |
2501 | falc_t *pfalc = (falc_t *) & chan->falc; | 2502 | falc_t *pfalc = (falc_t *) & chan->falc; |
@@ -2523,7 +2524,7 @@ void cpc_falc_status(pc300_t * card, int ch) | |||
2523 | CPC_UNLOCK(card, flags); | 2524 | CPC_UNLOCK(card, flags); |
2524 | } | 2525 | } |
2525 | 2526 | ||
2526 | int cpc_change_mtu(struct net_device *dev, int new_mtu) | 2527 | static int cpc_change_mtu(struct net_device *dev, int new_mtu) |
2527 | { | 2528 | { |
2528 | if ((new_mtu < 128) || (new_mtu > PC300_DEF_MTU)) | 2529 | if ((new_mtu < 128) || (new_mtu > PC300_DEF_MTU)) |
2529 | return -EINVAL; | 2530 | return -EINVAL; |
@@ -2531,7 +2532,7 @@ int cpc_change_mtu(struct net_device *dev, int new_mtu) | |||
2531 | return 0; | 2532 | return 0; |
2532 | } | 2533 | } |
2533 | 2534 | ||
2534 | int cpc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | 2535 | static int cpc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) |
2535 | { | 2536 | { |
2536 | hdlc_device *hdlc = dev_to_hdlc(dev); | 2537 | hdlc_device *hdlc = dev_to_hdlc(dev); |
2537 | pc300dev_t *d = (pc300dev_t *) dev->priv; | 2538 | pc300dev_t *d = (pc300dev_t *) dev->priv; |
@@ -2856,7 +2857,7 @@ static int clock_rate_calc(uclong rate, uclong clock, int *br_io) | |||
2856 | } | 2857 | } |
2857 | } | 2858 | } |
2858 | 2859 | ||
2859 | int ch_config(pc300dev_t * d) | 2860 | static int ch_config(pc300dev_t * d) |
2860 | { | 2861 | { |
2861 | pc300ch_t *chan = (pc300ch_t *) d->chan; | 2862 | pc300ch_t *chan = (pc300ch_t *) d->chan; |
2862 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; | 2863 | pc300chconf_t *conf = (pc300chconf_t *) & chan->conf; |
@@ -3004,7 +3005,7 @@ int ch_config(pc300dev_t * d) | |||
3004 | return 0; | 3005 | return 0; |
3005 | } | 3006 | } |
3006 | 3007 | ||
3007 | int rx_config(pc300dev_t * d) | 3008 | static int rx_config(pc300dev_t * d) |
3008 | { | 3009 | { |
3009 | pc300ch_t *chan = (pc300ch_t *) d->chan; | 3010 | pc300ch_t *chan = (pc300ch_t *) d->chan; |
3010 | pc300_t *card = (pc300_t *) chan->card; | 3011 | pc300_t *card = (pc300_t *) chan->card; |
@@ -3035,7 +3036,7 @@ int rx_config(pc300dev_t * d) | |||
3035 | return 0; | 3036 | return 0; |
3036 | } | 3037 | } |
3037 | 3038 | ||
3038 | int tx_config(pc300dev_t * d) | 3039 | static int tx_config(pc300dev_t * d) |
3039 | { | 3040 | { |
3040 | pc300ch_t *chan = (pc300ch_t *) d->chan; | 3041 | pc300ch_t *chan = (pc300ch_t *) d->chan; |
3041 | pc300_t *card = (pc300_t *) chan->card; | 3042 | pc300_t *card = (pc300_t *) chan->card; |
@@ -3098,7 +3099,7 @@ static int cpc_attach(struct net_device *dev, unsigned short encoding, | |||
3098 | return 0; | 3099 | return 0; |
3099 | } | 3100 | } |
3100 | 3101 | ||
3101 | void cpc_opench(pc300dev_t * d) | 3102 | static void cpc_opench(pc300dev_t * d) |
3102 | { | 3103 | { |
3103 | pc300ch_t *chan = (pc300ch_t *) d->chan; | 3104 | pc300ch_t *chan = (pc300ch_t *) d->chan; |
3104 | pc300_t *card = (pc300_t *) chan->card; | 3105 | pc300_t *card = (pc300_t *) chan->card; |
@@ -3116,7 +3117,7 @@ void cpc_opench(pc300dev_t * d) | |||
3116 | cpc_readb(scabase + M_REG(CTL, ch)) & ~(CTL_RTS | CTL_DTR)); | 3117 | cpc_readb(scabase + M_REG(CTL, ch)) & ~(CTL_RTS | CTL_DTR)); |
3117 | } | 3118 | } |
3118 | 3119 | ||
3119 | void cpc_closech(pc300dev_t * d) | 3120 | static void cpc_closech(pc300dev_t * d) |
3120 | { | 3121 | { |
3121 | pc300ch_t *chan = (pc300ch_t *) d->chan; | 3122 | pc300ch_t *chan = (pc300ch_t *) d->chan; |
3122 | pc300_t *card = (pc300_t *) chan->card; | 3123 | pc300_t *card = (pc300_t *) chan->card; |
@@ -3173,7 +3174,7 @@ int cpc_open(struct net_device *dev) | |||
3173 | return 0; | 3174 | return 0; |
3174 | } | 3175 | } |
3175 | 3176 | ||
3176 | int cpc_close(struct net_device *dev) | 3177 | static int cpc_close(struct net_device *dev) |
3177 | { | 3178 | { |
3178 | hdlc_device *hdlc = dev_to_hdlc(dev); | 3179 | hdlc_device *hdlc = dev_to_hdlc(dev); |
3179 | pc300dev_t *d = (pc300dev_t *) dev->priv; | 3180 | pc300dev_t *d = (pc300dev_t *) dev->priv; |