diff options
Diffstat (limited to 'drivers/isdn/hardware/mISDN/netjet.c')
-rw-r--r-- | drivers/isdn/hardware/mISDN/netjet.c | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/drivers/isdn/hardware/mISDN/netjet.c b/drivers/isdn/hardware/mISDN/netjet.c index 5ef9f11ee74..dd6de9f7a8a 100644 --- a/drivers/isdn/hardware/mISDN/netjet.c +++ b/drivers/isdn/hardware/mISDN/netjet.c @@ -191,7 +191,7 @@ fill_mem(struct tiger_ch *bc, u32 idx, u32 cnt, u32 fill) u32 mask = 0xff, val; pr_debug("%s: B%1d fill %02x len %d idx %d/%d\n", card->name, - bc->bch.nr, fill, cnt, idx, card->send.idx); + bc->bch.nr, fill, cnt, idx, card->send.idx); if (bc->bch.nr & 2) { fill <<= 8; mask <<= 8; @@ -213,7 +213,7 @@ mode_tiger(struct tiger_ch *bc, u32 protocol) struct tiger_hw *card = bc->bch.hw; pr_debug("%s: B%1d protocol %x-->%x\n", card->name, - bc->bch.nr, bc->bch.state, protocol); + bc->bch.nr, bc->bch.state, protocol); switch (protocol) { case ISDN_P_NONE: if (bc->bch.state == ISDN_P_NONE) @@ -237,7 +237,7 @@ mode_tiger(struct tiger_ch *bc, u32 protocol) test_and_set_bit(FLG_TRANSPARENT, &bc->bch.Flags); bc->bch.state = protocol; bc->idx = 0; - bc->free = card->send.size/2; + bc->free = card->send.size / 2; bc->rxstate = 0; bc->txstate = TX_INIT | TX_IDLE; bc->lastrx = -1; @@ -251,7 +251,7 @@ mode_tiger(struct tiger_ch *bc, u32 protocol) test_and_set_bit(FLG_HDLC, &bc->bch.Flags); bc->bch.state = protocol; bc->idx = 0; - bc->free = card->send.size/2; + bc->free = card->send.size / 2; bc->rxstate = 0; bc->txstate = TX_INIT | TX_IDLE; isdnhdlc_rcv_init(&bc->hrecv, 0); @@ -273,12 +273,12 @@ mode_tiger(struct tiger_ch *bc, u32 protocol) card->send.idx = (card->send.dmacur - card->send.dmastart) >> 2; card->recv.idx = (card->recv.dmacur - card->recv.dmastart) >> 2; pr_debug("%s: %s ctrl %x irq %02x/%02x idx %d/%d\n", - card->name, __func__, - inb(card->base + NJ_DMACTRL), - inb(card->base + NJ_IRQMASK0), - inb(card->base + NJ_IRQSTAT0), - card->send.idx, - card->recv.idx); + card->name, __func__, + inb(card->base + NJ_DMACTRL), + inb(card->base + NJ_IRQMASK0), + inb(card->base + NJ_IRQSTAT0), + card->send.idx, + card->recv.idx); return 0; } @@ -311,7 +311,7 @@ inittiger(struct tiger_hw *card) int i; card->dma_p = pci_alloc_consistent(card->pdev, NJ_DMA_SIZE, - &card->dma); + &card->dma); if (!card->dma_p) { pr_info("%s: No DMA memory\n", card->name); return -ENOMEM; @@ -344,9 +344,9 @@ inittiger(struct tiger_hw *card) if (debug & DEBUG_HW) pr_notice("%s: send buffer phy %#x - %#x - %#x virt %p" - " size %zu u32\n", card->name, - card->send.dmastart, card->send.dmairq, - card->send.dmaend, card->send.start, card->send.size); + " size %zu u32\n", card->name, + card->send.dmastart, card->send.dmairq, + card->send.dmaend, card->send.start, card->send.size); outl(card->send.dmastart, card->base + NJ_DMA_READ_START); outl(card->send.dmairq, card->base + NJ_DMA_READ_IRQ); @@ -362,9 +362,9 @@ inittiger(struct tiger_hw *card) if (debug & DEBUG_HW) pr_notice("%s: recv buffer phy %#x - %#x - %#x virt %p" - " size %zu u32\n", card->name, - card->recv.dmastart, card->recv.dmairq, - card->recv.dmaend, card->recv.start, card->recv.size); + " size %zu u32\n", card->name, + card->recv.dmastart, card->recv.dmairq, + card->recv.dmaend, card->recv.start, card->recv.size); outl(card->recv.dmastart, card->base + NJ_DMA_WRITE_START); outl(card->recv.dmairq, card->base + NJ_DMA_WRITE_IRQ); @@ -398,7 +398,7 @@ read_dma(struct tiger_ch *bc, u32 idx, int cnt) if (test_bit(FLG_TRANSPARENT, &bc->bch.Flags)) { if ((bc->bch.rx_skb->len + cnt) > bc->bch.maxlen) { pr_debug("%s: B%1d overrun %d\n", card->name, - bc->bch.nr, bc->bch.rx_skb->len + cnt); + bc->bch.nr, bc->bch.rx_skb->len + cnt); skb_trim(bc->bch.rx_skb, 0); return; } @@ -418,8 +418,8 @@ read_dma(struct tiger_ch *bc, u32 idx, int cnt) next_frame: if (test_bit(FLG_HDLC, &bc->bch.Flags)) { stat = isdnhdlc_decode(&bc->hrecv, pn, cnt, &i, - bc->bch.rx_skb->data, bc->bch.maxlen); - if (stat > 0) /* valid frame received */ + bc->bch.rx_skb->data, bc->bch.maxlen); + if (stat > 0) /* valid frame received */ p = skb_put(bc->bch.rx_skb, stat); else if (stat == -HDLC_CRC_ERROR) pr_info("%s: B%1d receive frame CRC error\n", @@ -431,14 +431,14 @@ next_frame: pr_info("%s: B%1d receive frame too long (> %d)\n", card->name, bc->bch.nr, bc->bch.maxlen); } else - stat = cnt; + stat = cnt; if (stat > 0) { if (debug & DEBUG_HW_BFIFO) { snprintf(card->log, LOG_SIZE, "B%1d-recv %s %d ", - bc->bch.nr, card->name, stat); + bc->bch.nr, card->name, stat); print_hex_dump_bytes(card->log, DUMP_PREFIX_OFFSET, - p, stat); + p, stat); } recv_Bchannel(&bc->bch, 0); } @@ -447,7 +447,7 @@ next_frame: cnt -= i; if (!bc->bch.rx_skb) { bc->bch.rx_skb = mI_alloc_skb(bc->bch.maxlen, - GFP_ATOMIC); + GFP_ATOMIC); if (!bc->bch.rx_skb) { pr_info("%s: B%1d receive out of memory\n", card->name, bc->bch.nr); @@ -498,7 +498,7 @@ resync(struct tiger_ch *bc, struct tiger_hw *card) bc->idx = card->recv.size - 1; bc->txstate = TX_RUN; pr_debug("%s: %s B%1d free %d idx %d/%d\n", card->name, - __func__, bc->bch.nr, bc->free, bc->idx, card->send.idx); + __func__, bc->bch.nr, bc->free, bc->idx, card->send.idx); } static int bc_next_frame(struct tiger_ch *); @@ -514,14 +514,14 @@ fill_hdlc_flag(struct tiger_ch *bc) if (bc->free == 0) return; pr_debug("%s: %s B%1d %d state %x idx %d/%d\n", card->name, - __func__, bc->bch.nr, bc->free, bc->txstate, - bc->idx, card->send.idx); + __func__, bc->bch.nr, bc->free, bc->txstate, + bc->idx, card->send.idx); if (bc->txstate & (TX_IDLE | TX_INIT | TX_UNDERRUN)) resync(bc, card); count = isdnhdlc_encode(&bc->hsend, NULL, 0, &i, - bc->hsbuf, bc->free); + bc->hsbuf, bc->free); pr_debug("%s: B%1d hdlc encoded %d flags\n", card->name, - bc->bch.nr, count); + bc->bch.nr, count); bc->free -= count; p = bc->hsbuf; m = (bc->bch.nr & 1) ? 0xffffff00 : 0xffff00ff; @@ -535,7 +535,7 @@ fill_hdlc_flag(struct tiger_ch *bc) } if (debug & DEBUG_HW_BFIFO) { snprintf(card->log, LOG_SIZE, "B%1d-send %s %d ", - bc->bch.nr, card->name, count); + bc->bch.nr, card->name, count); print_hex_dump_bytes(card->log, DUMP_PREFIX_OFFSET, p, count); } } @@ -554,16 +554,16 @@ fill_dma(struct tiger_ch *bc) if (count <= 0) return; pr_debug("%s: %s B%1d %d/%d/%d/%d state %x idx %d/%d\n", card->name, - __func__, bc->bch.nr, count, bc->free, bc->bch.tx_idx, - bc->bch.tx_skb->len, bc->txstate, bc->idx, card->send.idx); + __func__, bc->bch.nr, count, bc->free, bc->bch.tx_idx, + bc->bch.tx_skb->len, bc->txstate, bc->idx, card->send.idx); if (bc->txstate & (TX_IDLE | TX_INIT | TX_UNDERRUN)) resync(bc, card); p = bc->bch.tx_skb->data + bc->bch.tx_idx; if (test_bit(FLG_HDLC, &bc->bch.Flags)) { count = isdnhdlc_encode(&bc->hsend, p, count, &i, - bc->hsbuf, bc->free); + bc->hsbuf, bc->free); pr_debug("%s: B%1d hdlc encoded %d in %d\n", card->name, - bc->bch.nr, i, count); + bc->bch.nr, i, count); bc->bch.tx_idx += i; bc->free -= count; p = bc->hsbuf; @@ -584,7 +584,7 @@ fill_dma(struct tiger_ch *bc) } if (debug & DEBUG_HW_BFIFO) { snprintf(card->log, LOG_SIZE, "B%1d-send %s %d ", - bc->bch.nr, card->name, count); + bc->bch.nr, card->name, count); print_hex_dump_bytes(card->log, DUMP_PREFIX_OFFSET, p, count); } if (bc->free) @@ -633,7 +633,7 @@ send_tiger_bc(struct tiger_hw *card, struct tiger_ch *bc) return; } pr_debug("%s: B%1d TX no data free %d idx %d/%d\n", card->name, - bc->bch.nr, bc->free, bc->idx, card->send.idx); + bc->bch.nr, bc->free, bc->idx, card->send.idx); if (!(bc->txstate & (TX_IDLE | TX_INIT))) { fill_mem(bc, bc->idx, bc->free, 0xff); if (bc->free == card->send.size) @@ -706,8 +706,8 @@ nj_irq(int intno, void *dev_id) s0val |= 0x01; /* the 1st read area is free */ pr_debug("%s: DMA Status %02x/%02x/%02x %d/%d\n", card->name, - s1val, s0val, card->last_is0, - card->recv.idx, card->send.idx); + s1val, s0val, card->last_is0, + card->recv.idx, card->send.idx); /* test if we have a DMA interrupt */ if (s0val != card->last_is0) { if ((s0val & NJ_IRQM0_RD_MASK) != @@ -758,7 +758,7 @@ nj_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb) spin_unlock_irqrestore(&card->lock, flags); if (!ret) _queue_data(ch, PH_ACTIVATE_IND, MISDN_ID_ANY, 0, - NULL, GFP_KERNEL); + NULL, GFP_KERNEL); break; case PH_DEACTIVATE_REQ: spin_lock_irqsave(&card->lock, flags); @@ -766,7 +766,7 @@ nj_l2l1B(struct mISDNchannel *ch, struct sk_buff *skb) mode_tiger(bc, ISDN_P_NONE); spin_unlock_irqrestore(&card->lock, flags); _queue_data(ch, PH_DEACTIVATE_IND, MISDN_ID_ANY, 0, - NULL, GFP_KERNEL); + NULL, GFP_KERNEL); ret = 0; break; } @@ -785,7 +785,7 @@ channel_bctrl(struct tiger_ch *bc, struct mISDN_ctrl_req *cq) case MISDN_CTRL_GETOP: cq->op = 0; break; - /* Nothing implemented yet */ + /* Nothing implemented yet */ case MISDN_CTRL_FILL_EMPTY: default: pr_info("%s: %s unknown Op %x\n", card->name, __func__, cq->op); @@ -900,7 +900,7 @@ nj_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg) break; case CLOSE_CHANNEL: pr_debug("%s: dev(%d) close from %p\n", card->name, dch->dev.id, - __builtin_return_address(0)); + __builtin_return_address(0)); module_put(THIS_MODULE); break; case CONTROL_CHANNEL: @@ -908,7 +908,7 @@ nj_dctrl(struct mISDNchannel *ch, u32 cmd, void *arg) break; default: pr_debug("%s: %s unknown command %x\n", - card->name, __func__, cmd); + card->name, __func__, cmd); return -EINVAL; } return err; @@ -968,7 +968,7 @@ nj_release(struct tiger_hw *card) free_irq(card->irq, card); if (card->isac.dch.dev.dev.class) mISDN_unregister_device(&card->isac.dch.dev); - + for (i = 0; i < 2; i++) { mISDN_freebchannel(&card->bc[i].bch); kfree(card->bc[i].hsbuf); @@ -976,7 +976,7 @@ nj_release(struct tiger_hw *card) } if (card->dma_p) pci_free_consistent(card->pdev, NJ_DMA_SIZE, - card->dma_p, card->dma); + card->dma_p, card->dma); write_lock_irqsave(&card_lock, flags); list_del(&card->list); write_unlock_irqrestore(&card_lock, flags); @@ -1033,14 +1033,14 @@ setup_instance(struct tiger_hw *card) card->bc[i].bch.ch.ctrl = nj_bctrl; card->bc[i].bch.ch.nr = i + 1; list_add(&card->bc[i].bch.ch.list, - &card->isac.dch.dev.bchannels); + &card->isac.dch.dev.bchannels); card->bc[i].bch.hw = card; } err = nj_setup(card); if (err) goto error; err = mISDN_register_device(&card->isac.dch.dev, &card->pdev->dev, - card->name); + card->name); if (err) goto error; err = nj_init_card(card); @@ -1074,7 +1074,7 @@ nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } if (pdev->subsystem_vendor == 0xb100 && - pdev->subsystem_device == 0x0003 ) { + pdev->subsystem_device == 0x0003) { pr_notice("Netjet: Digium TDM400P not handled yet\n"); return -ENODEV; } @@ -1094,7 +1094,7 @@ nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent) } printk(KERN_INFO "nj_probe(mISDN): found adapter at %s\n", - pci_name(pdev)); + pci_name(pdev)); pci_set_master(pdev); |