aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/pc300_drv.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-10-30 04:43:08 -0400
committerIngo Molnar <mingo@elte.hu>2010-10-30 04:43:08 -0400
commit169ed55bd30305b933f52bfab32a58671d44ab68 (patch)
tree32e280957474f458901abfce16fa2a1687ef7497 /drivers/net/wan/pc300_drv.c
parent3d7851b3cdd43a734e5cc4c643fd886ab28ad4d5 (diff)
parent45f81b1c96d9793e47ce925d257ea693ce0b193e (diff)
Merge branch 'tip/perf/jump-label-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/urgent
Diffstat (limited to 'drivers/net/wan/pc300_drv.c')
-rw-r--r--drivers/net/wan/pc300_drv.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c
index c6aa66e5b52f..f875cfae3093 100644
--- a/drivers/net/wan/pc300_drv.c
+++ b/drivers/net/wan/pc300_drv.c
@@ -1,5 +1,5 @@
1#define USE_PCI_CLOCK 1#define USE_PCI_CLOCK
2static char rcsid[] = 2static const char rcsid[] =
3"Revision: 3.4.5 Date: 2002/03/07 "; 3"Revision: 3.4.5 Date: 2002/03/07 ";
4 4
5/* 5/*
@@ -451,11 +451,11 @@ static int dma_get_rx_frame_size(pc300_t * card, int ch)
451 if ((status & DST_EOM) || (first_bd == card->chan[ch].rx_last_bd)) { 451 if ((status & DST_EOM) || (first_bd == card->chan[ch].rx_last_bd)) {
452 /* Return the size of a good frame or incomplete bad frame 452 /* Return the size of a good frame or incomplete bad frame
453 * (dma_buf_read will clean the buffer descriptors in this case). */ 453 * (dma_buf_read will clean the buffer descriptors in this case). */
454 return (rcvd); 454 return rcvd;
455 } 455 }
456 ptdescr = (card->hw.rambase + cpc_readl(&ptdescr->next)); 456 ptdescr = (card->hw.rambase + cpc_readl(&ptdescr->next));
457 } 457 }
458 return (-1); 458 return -1;
459} 459}
460 460
461/* 461/*
@@ -557,7 +557,7 @@ static int dma_buf_read(pc300_t * card, int ch, struct sk_buff *skb)
557 cpc_writel(card->hw.scabase + DRX_REG(EDAL, ch), 557 cpc_writel(card->hw.scabase + DRX_REG(EDAL, ch),
558 RX_BD_ADDR(ch, chan->rx_last_bd)); 558 RX_BD_ADDR(ch, chan->rx_last_bd));
559 } 559 }
560 return (rcvd); 560 return rcvd;
561} 561}
562 562
563static void tx_dma_stop(pc300_t * card, int ch) 563static void tx_dma_stop(pc300_t * card, int ch)
@@ -1733,7 +1733,7 @@ static u16 falc_pattern_test_error(pc300_t * card, int ch)
1733 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch]; 1733 pc300ch_t *chan = (pc300ch_t *) & card->chan[ch];
1734 falc_t *pfalc = (falc_t *) & chan->falc; 1734 falc_t *pfalc = (falc_t *) & chan->falc;
1735 1735
1736 return (pfalc->bec); 1736 return pfalc->bec;
1737} 1737}
1738 1738
1739/**********************************/ 1739/**********************************/
@@ -2819,7 +2819,7 @@ static int clock_rate_calc(u32 rate, u32 clock, int *br_io)
2819 *br_io = 0; 2819 *br_io = 0;
2820 2820
2821 if (rate == 0) 2821 if (rate == 0)
2822 return (0); 2822 return 0;
2823 2823
2824 for (br = 0, br_pwr = 1; br <= 9; br++, br_pwr <<= 1) { 2824 for (br = 0, br_pwr = 1; br <= 9; br++, br_pwr <<= 1) {
2825 if ((tc = clock / br_pwr / rate) <= 0xff) { 2825 if ((tc = clock / br_pwr / rate) <= 0xff) {
@@ -2832,11 +2832,11 @@ static int clock_rate_calc(u32 rate, u32 clock, int *br_io)
2832 error = ((rate - (clock / br_pwr / rate)) / rate) * 1000; 2832 error = ((rate - (clock / br_pwr / rate)) / rate) * 1000;
2833 /* Errors bigger than +/- 1% won't be tolerated */ 2833 /* Errors bigger than +/- 1% won't be tolerated */
2834 if (error < -10 || error > 10) 2834 if (error < -10 || error > 10)
2835 return (-1); 2835 return -1;
2836 else 2836 else
2837 return (tc); 2837 return tc;
2838 } else { 2838 } else {
2839 return (-1); 2839 return -1;
2840 } 2840 }
2841} 2841}
2842 2842
@@ -3207,7 +3207,7 @@ static u32 detect_ram(pc300_t * card)
3207 break; 3207 break;
3208 } 3208 }
3209 } 3209 }
3210 return (i); 3210 return i;
3211} 3211}
3212 3212
3213static void plx_init(pc300_t * card) 3213static void plx_init(pc300_t * card)