• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/isdn/gigaset/

Lines Matching refs:bcs

313 static inline void error_hangup(struct bc_state *bcs)
315 struct cardstate *cs = bcs->cs;
318 __func__, bcs->channel);
320 if (!gigaset_add_event(cs, &bcs->at_state, EV_HUP, NULL, 0, NULL))
337 req_submit(cs->bcs, HD_CLOSE_ATCHANNEL, 0, BAS_TIMEOUT);
602 struct bc_state *bcs;
658 bcs = cs->bcs + channel;
660 gigaset_bchannel_up(bcs);
671 bcs = cs->bcs + channel;
673 stopurbs(bcs->hw.bas);
674 gigaset_bchannel_down(bcs);
684 bcs = cs->bcs + channel;
686 &bcs->hw.bas->corrbytes);
689 channel, bcs->hw.bas->numsub, l,
690 atomic_read(&bcs->hw.bas->corrbytes));
763 struct bc_state *bcs;
779 bcs = urb->context;
780 ubc = bcs->hw.bas;
801 urb->dev = bcs->cs->hw.bas->udev;
808 dev_err(bcs->cs->dev,
812 error_hangup(bcs);
845 ubc = ucx->bcs->hw.bas;
862 static int starturbs(struct bc_state *bcs)
864 struct bas_bc_state *ubc = bcs->hw.bas;
870 if (bcs->proto2 == ISDN_PROTO_L2_HDLC)
871 bcs->inputstate |= INS_flag_hunt;
882 urb->dev = bcs->cs->hw.bas->udev;
883 urb->pipe = usb_rcvisocpipe(urb->dev, 3 + 2 * bcs->channel);
890 urb->context = bcs;
913 urb->dev = bcs->cs->hw.bas->udev;
914 urb->pipe = usb_sndisocpipe(urb->dev, 4 + 2 * bcs->channel);
989 struct bas_bc_state *ubc = ucx->bcs->hw.bas;
994 urb->dev = ucx->bcs->cs->hw.bas->udev;
1026 dev_err(ucx->bcs->cs->dev,
1047 dev_err(ucx->bcs->cs->dev,
1064 struct bc_state *bcs = (struct bc_state *) data;
1065 struct bas_bc_state *ubc = bcs->hw.bas;
1066 struct cardstate *cs = bcs->cs;
1093 error_hangup(bcs);
1118 error_hangup(bcs);
1174 error_hangup(bcs);
1195 error_hangup(bcs);
1201 while ((skb = skb_dequeue(&bcs->squeue))) {
1204 if (gigaset_isoc_buildframe(bcs, skb->data, len) == -EAGAIN) {
1206 skb_queue_head(&bcs->squeue, skb);
1208 __func__, skb_queue_len(&bcs->squeue));
1212 gigaset_skb_sent(bcs, skb);
1228 struct bc_state *bcs = (struct bc_state *) data;
1229 struct bas_bc_state *ubc = bcs->hw.bas;
1230 struct cardstate *cs = bcs->cs;
1279 error_hangup(bcs);
1322 gigaset_isoc_receive(rcvbuf + offset, numbytes, bcs);
1337 urb->dev = bcs->cs->hw.bas->udev;
1346 error_hangup(bcs);
1361 struct bc_state *bcs = (struct bc_state *) data;
1362 struct bas_cardstate *ucs = bcs->cs->hw.bas;
1379 dev_err(bcs->cs->dev, "timeout opening AT channel\n");
1380 error_reset(bcs->cs);
1385 dev_err(bcs->cs->dev, "timeout opening channel %d\n",
1386 bcs->channel + 1);
1387 error_hangup(bcs);
1391 dev_err(bcs->cs->dev, "timeout closing AT channel\n");
1396 dev_err(bcs->cs->dev, "timeout closing channel %d\n",
1397 bcs->channel + 1);
1398 error_reset(bcs->cs);
1402 dev_warn(bcs->cs->dev, "request 0x%02x timed out, clearing\n",
1479 * bcs B channel control structure
1488 static int req_submit(struct bc_state *bcs, int req, int val, int timeout)
1490 struct bas_cardstate *ucs = bcs->cs->hw.bas;
1499 dev_err(bcs->cs->dev,
1518 dev_err(bcs->cs->dev, "could not submit request 0x%02x: %s\n",
1528 ucs->timer_ctrl.data = (unsigned long) bcs;
1545 static int gigaset_init_bchannel(struct bc_state *bcs)
1550 spin_lock_irqsave(&bcs->cs->lock, flags);
1551 if (unlikely(!bcs->cs->connected)) {
1553 spin_unlock_irqrestore(&bcs->cs->lock, flags);
1557 if ((ret = starturbs(bcs)) < 0) {
1558 dev_err(bcs->cs->dev,
1560 bcs->channel + 1,
1563 error_hangup(bcs);
1564 spin_unlock_irqrestore(&bcs->cs->lock, flags);
1568 req = bcs->channel ? HD_OPEN_B2CHANNEL : HD_OPEN_B1CHANNEL;
1569 if ((ret = req_submit(bcs, req, 0, BAS_TIMEOUT)) < 0) {
1570 dev_err(bcs->cs->dev, "could not open channel B%d\n",
1571 bcs->channel + 1);
1572 stopurbs(bcs->hw.bas);
1574 error_hangup(bcs);
1577 spin_unlock_irqrestore(&bcs->cs->lock, flags);
1591 static int gigaset_close_bchannel(struct bc_state *bcs)
1596 spin_lock_irqsave(&bcs->cs->lock, flags);
1597 if (unlikely(!bcs->cs->connected)) {
1598 spin_unlock_irqrestore(&bcs->cs->lock, flags);
1603 if (!(atomic_read(&bcs->cs->hw.bas->basstate) &
1604 (bcs->channel ? BS_B2OPEN : BS_B1OPEN))) {
1606 spin_unlock_irqrestore(&bcs->cs->lock, flags);
1607 gigaset_bchannel_down(bcs);
1612 req = bcs->channel ? HD_CLOSE_B2CHANNEL : HD_CLOSE_B1CHANNEL;
1613 if ((ret = req_submit(bcs, req, 0, BAS_TIMEOUT)) < 0)
1614 dev_err(bcs->cs->dev, "closing channel B%d failed\n",
1615 bcs->channel + 1);
1617 spin_unlock_irqrestore(&bcs->cs->lock, flags);
1801 rc = req_submit(cs->bcs, HD_OPEN_ATCHANNEL, 0, BAS_TIMEOUT);
1963 * bcs B channel structure
1967 static int gigaset_freebcshw(struct bc_state *bcs)
1969 struct bas_bc_state *ubc = bcs->hw.bas;
1990 bcs->hw.bas = NULL;
1996 * bcs B channel structure
2000 static int gigaset_initbcshw(struct bc_state *bcs)
2005 bcs->hw.bas = ubc = kmalloc(sizeof(struct bas_bc_state), GFP_KERNEL);
2016 ubc->isoouturbs[i].bcs = bcs;
2023 bcs->hw.bas = NULL;
2027 &write_iso_tasklet, (unsigned long) bcs);
2048 &read_iso_tasklet, (unsigned long) bcs);
2052 static void gigaset_reinitbcshw(struct bc_state *bcs)
2054 struct bas_bc_state *ubc = bcs->hw.bas;
2056 atomic_set(&bcs->hw.bas->running, 0);
2057 atomic_set(&bcs->hw.bas->corrbytes, 0);
2058 bcs->hw.bas->numsub = 0;
2109 ubc = cs->bcs[j].hw.bas;
2210 ubc = cs->bcs[j].hw.bas;
2238 if ((rc = req_submit(cs->bcs, HD_DEVICE_INIT_ACK, 0, 0)) != 0)
2282 gigaset_bchannel_down(cs->bcs + j);