Commit 79cefa55 authored by Daeseok Youn's avatar Daeseok Youn Committed by Greg Kroah-Hartman

staging: cxt1e1: remove redundant curly braces in musycc.c

Signed-off-by: default avatarDaeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b7923d22
...@@ -73,6 +73,10 @@ musycc_dump_rxbuffer_ring(mch_t *ch, int lockit) ...@@ -73,6 +73,10 @@ musycc_dump_rxbuffer_ring(mch_t *ch, int lockit)
u_int32_t status; u_int32_t status;
int n; int n;
#ifdef RLD_DUMP_BUFDATA
u_int32_t *dp;
int len = 0;
#endif
if (lockit) if (lockit)
spin_lock_irqsave(&ch->ch_rxlock, flags); spin_lock_irqsave(&ch->ch_rxlock, flags);
if (ch->rxd_num == 0) if (ch->rxd_num == 0)
...@@ -82,7 +86,6 @@ musycc_dump_rxbuffer_ring(mch_t *ch, int lockit) ...@@ -82,7 +86,6 @@ musycc_dump_rxbuffer_ring(mch_t *ch, int lockit)
m = &ch->mdr[ch->rxix_irq_srv]; m = &ch->mdr[ch->rxix_irq_srv];
for (n = ch->rxd_num; n; n--) { for (n = ch->rxd_num; n; n--) {
status = le32_to_cpu(m->status); status = le32_to_cpu(m->status);
{
pr_info("%c %08lx[%2d]: sts %08x (%c%c%c%c:%d.) Data [%08x] Next [%08x]\n", pr_info("%c %08lx[%2d]: sts %08x (%c%c%c%c:%d.) Data [%08x] Next [%08x]\n",
(m == &ch->mdr[ch->rxix_irq_srv]) ? 'F' : ' ', (m == &ch->mdr[ch->rxix_irq_srv]) ? 'F' : ' ',
(unsigned long) m, n, (unsigned long) m, n,
...@@ -94,9 +97,7 @@ musycc_dump_rxbuffer_ring(mch_t *ch, int lockit) ...@@ -94,9 +97,7 @@ musycc_dump_rxbuffer_ring(mch_t *ch, int lockit)
status & LENGTH_MASK, status & LENGTH_MASK,
le32_to_cpu(m->data), le32_to_cpu(m->next)); le32_to_cpu(m->data), le32_to_cpu(m->next));
#ifdef RLD_DUMP_BUFDATA #ifdef RLD_DUMP_BUFDATA
{ len = status & LENGTH_MASK;
u_int32_t *dp;
int len = status & LENGTH_MASK;
#if 1 #if 1
if (m->data && (status & HOST_RX_OWNED)) if (m->data && (status & HOST_RX_OWNED))
...@@ -115,12 +116,10 @@ musycc_dump_rxbuffer_ring(mch_t *ch, int lockit) ...@@ -115,12 +116,10 @@ musycc_dump_rxbuffer_ring(mch_t *ch, int lockit)
else else
pr_info(" %x[%x]: %08X\n", (u_int32_t) dp, len, *dp); pr_info(" %x[%x]: %08X\n", (u_int32_t) dp, len, *dp);
} }
}
#endif #endif
}
m = m->snext; m = m->snext;
} }
} /* -for- */ }
pr_info("\n"); pr_info("\n");
if (lockit) if (lockit)
...@@ -135,6 +134,10 @@ musycc_dump_txbuffer_ring(mch_t *ch, int lockit) ...@@ -135,6 +134,10 @@ musycc_dump_txbuffer_ring(mch_t *ch, int lockit)
unsigned long flags = 0; unsigned long flags = 0;
u_int32_t status; u_int32_t status;
int n; int n;
#ifdef RLD_DUMP_BUFDATA
u_int32_t *dp;
int len = 0;
#endif
if (lockit) if (lockit)
spin_lock_irqsave(&ch->ch_txlock, flags); spin_lock_irqsave(&ch->ch_txlock, flags);
...@@ -145,7 +148,6 @@ musycc_dump_txbuffer_ring(mch_t *ch, int lockit) ...@@ -145,7 +148,6 @@ musycc_dump_txbuffer_ring(mch_t *ch, int lockit)
m = ch->txd_irq_srv; m = ch->txd_irq_srv;
for (n = ch->txd_num; n; n--) { for (n = ch->txd_num; n; n--) {
status = le32_to_cpu(m->status); status = le32_to_cpu(m->status);
{
pr_info("%c%c %08lx[%2d]: sts %08x (%c%c%c%c:%d.) Data [%08x] Next [%08x]\n", pr_info("%c%c %08lx[%2d]: sts %08x (%c%c%c%c:%d.) Data [%08x] Next [%08x]\n",
(m == ch->txd_usr_add) ? 'F' : ' ', (m == ch->txd_usr_add) ? 'F' : ' ',
(m == ch->txd_irq_srv) ? 'L' : ' ', (m == ch->txd_irq_srv) ? 'L' : ' ',
...@@ -158,9 +160,7 @@ musycc_dump_txbuffer_ring(mch_t *ch, int lockit) ...@@ -158,9 +160,7 @@ musycc_dump_txbuffer_ring(mch_t *ch, int lockit)
status & LENGTH_MASK, status & LENGTH_MASK,
le32_to_cpu(m->data), le32_to_cpu(m->next)); le32_to_cpu(m->data), le32_to_cpu(m->next));
#ifdef RLD_DUMP_BUFDATA #ifdef RLD_DUMP_BUFDATA
{ len = status & LENGTH_MASK;
u_int32_t *dp;
int len = status & LENGTH_MASK;
if (m->data) { if (m->data) {
dp = (u_int32_t *) OS_phystov((void *) (le32_to_cpu(m->data))); dp = (u_int32_t *) OS_phystov((void *) (le32_to_cpu(m->data)));
...@@ -173,9 +173,7 @@ musycc_dump_txbuffer_ring(mch_t *ch, int lockit) ...@@ -173,9 +173,7 @@ musycc_dump_txbuffer_ring(mch_t *ch, int lockit)
else else
pr_info(" %x[%x]: %08X\n", (u_int32_t) dp, len, *dp); pr_info(" %x[%x]: %08X\n", (u_int32_t) dp, len, *dp);
} }
}
#endif #endif
}
m = m->snext; m = m->snext;
} }
} /* -for- */ } /* -for- */
...@@ -195,11 +193,10 @@ status_t ...@@ -195,11 +193,10 @@ status_t
musycc_dump_ring(ci_t *ci, unsigned int chan) musycc_dump_ring(ci_t *ci, unsigned int chan)
{ {
mch_t *ch; mch_t *ch;
int bh;
if (chan >= MAX_CHANS_USED) if (chan >= MAX_CHANS_USED)
return SBE_DRVR_FAIL; /* E2BIG */ return SBE_DRVR_FAIL; /* E2BIG */
{
int bh;
bh = atomic_read(&ci->bh_pending); bh = atomic_read(&ci->bh_pending);
pr_info(">> bh_pend %d [%d] ihead %d itail %d [%d] th_cnt %d bh_cnt %d wdcnt %d note %d\n", pr_info(">> bh_pend %d [%d] ihead %d itail %d [%d] th_cnt %d bh_cnt %d wdcnt %d note %d\n",
...@@ -209,7 +206,6 @@ musycc_dump_ring(ci_t *ci, unsigned int chan) ...@@ -209,7 +206,6 @@ musycc_dump_ring(ci_t *ci, unsigned int chan)
ci->wdcount, ci->wd_notify); ci->wdcount, ci->wd_notify);
max_bh = 0; /* reset counter */ max_bh = 0; /* reset counter */
max_intcnt = 0; /* reset counter */ max_intcnt = 0; /* reset counter */
}
ch = sd_find_chan(dummy, chan); ch = sd_find_chan(dummy, chan);
if (!ch) { if (!ch) {
...@@ -336,6 +332,10 @@ musycc_wq_chan_restart(void *arg) /* channel private structure */ ...@@ -336,6 +332,10 @@ musycc_wq_chan_restart(void *arg) /* channel private structure */
mpi_t *pi; mpi_t *pi;
struct mdesc *md; struct mdesc *md;
#if defined(RLD_TRANS_DEBUG) || defined(RLD_RXACT_DEBUG)
static int hereb4 = 7;
#endif
ch = container_of(arg, struct c4_chan_info, ch_work); ch = container_of(arg, struct c4_chan_info, ch_work);
pi = ch->up; pi = ch->up;
...@@ -353,9 +353,6 @@ musycc_wq_chan_restart(void *arg) /* channel private structure */ ...@@ -353,9 +353,6 @@ musycc_wq_chan_restart(void *arg) /* channel private structure */
ch->ch_start_rx = 0; ch->ch_start_rx = 0;
#if defined(RLD_TRANS_DEBUG) || defined(RLD_RXACT_DEBUG) #if defined(RLD_TRANS_DEBUG) || defined(RLD_RXACT_DEBUG)
{
static int hereb4 = 7;
if (hereb4) { /* RLD DEBUG */ if (hereb4) { /* RLD DEBUG */
hereb4--; hereb4--;
#ifdef RLD_TRANS_DEBUG #ifdef RLD_TRANS_DEBUG
...@@ -371,7 +368,6 @@ musycc_wq_chan_restart(void *arg) /* channel private structure */ ...@@ -371,7 +368,6 @@ musycc_wq_chan_restart(void *arg) /* channel private structure */
musycc_dump_rxbuffer_ring(ch, 1); /* RLD DEBUG */ musycc_dump_rxbuffer_ring(ch, 1); /* RLD DEBUG */
#endif #endif
} }
}
#endif #endif
musycc_serv_req(pi, SR_CHANNEL_ACTIVATE | SR_RX_DIRECTION | ch->gchan); musycc_serv_req(pi, SR_CHANNEL_ACTIVATE | SR_RX_DIRECTION | ch->gchan);
} }
...@@ -877,6 +873,9 @@ musycc_bh_tx_eom(mpi_t *pi, int gchan) ...@@ -877,6 +873,9 @@ musycc_bh_tx_eom(mpi_t *pi, int gchan)
md->data = 0; md->data = 0;
if (md->mem_token) { if (md->mem_token) {
#ifdef CONFIG_SBE_WAN256T3_NCOMM
int hdlcnum = 0;
#endif
/* upcount channel */ /* upcount channel */
atomic_sub(OS_mem_token_tlen(md->mem_token), &ch->tx_pending); atomic_sub(OS_mem_token_tlen(md->mem_token), &ch->tx_pending);
/* upcount card */ /* upcount card */
...@@ -888,15 +887,13 @@ musycc_bh_tx_eom(mpi_t *pi, int gchan) ...@@ -888,15 +887,13 @@ musycc_bh_tx_eom(mpi_t *pi, int gchan)
#ifdef CONFIG_SBE_WAN256T3_NCOMM #ifdef CONFIG_SBE_WAN256T3_NCOMM
/* callback that our packet was sent */ /* callback that our packet was sent */
{ hdlcnum = (pi->portnum * 32 + gchan);
int hdlcnum = (pi->portnum * 32 + gchan);
if (hdlcnum >= 228) { if (hdlcnum >= 228) {
if (nciProcess_TX_complete) if (nciProcess_TX_complete)
(*nciProcess_TX_complete) (hdlcnum, (*nciProcess_TX_complete) (hdlcnum,
getuserbychan(gchan)); getuserbychan(gchan));
} }
}
#endif /*** CONFIG_SBE_WAN256T3_NCOMM ***/ #endif /*** CONFIG_SBE_WAN256T3_NCOMM ***/
OS_mem_token_free_irq(md->mem_token); OS_mem_token_free_irq(md->mem_token);
...@@ -1361,7 +1358,6 @@ musycc_intr_bh_tasklet(ci_t *ci) ...@@ -1361,7 +1358,6 @@ musycc_intr_bh_tasklet(ci_t *ci)
*/ */
ch->ch_start_tx = CH_START_TX_ONR; ch->ch_start_tx = CH_START_TX_ONR;
{
#ifdef RLD_TRANS_DEBUG #ifdef RLD_TRANS_DEBUG
if (1 || cxt1e1_log_level >= LOG_MONITOR) if (1 || cxt1e1_log_level >= LOG_MONITOR)
#else #else
...@@ -1381,7 +1377,6 @@ musycc_intr_bh_tasklet(ci_t *ci) ...@@ -1381,7 +1377,6 @@ musycc_intr_bh_tasklet(ci_t *ci)
} }
#endif #endif
} }
}
} else { /* RX buffer overrun */ } else { /* RX buffer overrun */
/* /*
* Per MUSYCC manual, Section 6.4.8.4 [Receive Errors], * Per MUSYCC manual, Section 6.4.8.4 [Receive Errors],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment