Lines Matching refs:drvidx
975 int drvidx; in isdn_read() local
1016 drvidx = isdn_minor2drv(minor); in isdn_read()
1017 if (drvidx < 0) { in isdn_read()
1021 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING)) { in isdn_read()
1032 len = isdn_readbchan(drvidx, chidx, p, 0, count, in isdn_read()
1033 &dev->drv[drvidx]->rcv_waitq[chidx]); in isdn_read()
1043 drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL); in isdn_read()
1044 if (drvidx < 0) { in isdn_read()
1048 if (!dev->drv[drvidx]->stavail) { in isdn_read()
1053 interruptible_sleep_on(&(dev->drv[drvidx]->st_waitq)); in isdn_read()
1055 if (dev->drv[drvidx]->interface->readstat) { in isdn_read()
1056 if (count > dev->drv[drvidx]->stavail) in isdn_read()
1057 count = dev->drv[drvidx]->stavail; in isdn_read()
1058 len = dev->drv[drvidx]->interface-> in isdn_read()
1059 readstat(buf, count, 1, drvidx, in isdn_read()
1071 dev->drv[drvidx]->stavail -= len; in isdn_read()
1073 dev->drv[drvidx]->stavail = 0; in isdn_read()
1095 int drvidx; in isdn_write() local
1110 drvidx = isdn_minor2drv(minor); in isdn_write()
1111 if (drvidx < 0) { in isdn_write()
1115 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING)) { in isdn_write()
1120 while (isdn_writebuf_stub(drvidx, chidx, buf, count, 1) != count) in isdn_write()
1121 interruptible_sleep_on(&dev->drv[drvidx]->snd_waitq[chidx]); in isdn_write()
1126 drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL); in isdn_write()
1127 if (drvidx < 0) { in isdn_write()
1137 if (dev->drv[drvidx]->interface->writecmd) in isdn_write()
1138 retval = dev->drv[drvidx]->interface-> in isdn_write()
1139 writecmd(buf, count, 1, drvidx, isdn_minor2chan(minor)); in isdn_write()
1161 int drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL); in isdn_poll() local
1173 if (drvidx < 0) { in isdn_poll()
1178 poll_wait(file, &(dev->drv[drvidx]->st_waitq), wait); in isdn_poll()
1180 if (dev->drv[drvidx]->stavail) { in isdn_poll()
1203 int drvidx; in isdn_ioctl() local
1262 drvidx = isdn_minor2drv(minor); in isdn_ioctl()
1263 if (drvidx < 0) in isdn_ioctl()
1266 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING)) in isdn_ioctl()
1438 drvidx = -1; in isdn_ioctl()
1449 drvidx = -1; in isdn_ioctl()
1452 drvidx = i; in isdn_ioctl()
1457 if (drvidx == -1) in isdn_ioctl()
1460 dev->drv[drvidx]->flags |= DRV_FLAG_REJBUS; in isdn_ioctl()
1462 dev->drv[drvidx]->flags &= ~DRV_FLAG_REJBUS; in isdn_ioctl()
1533 drvidx = -1; in isdn_ioctl()
1536 drvidx = i; in isdn_ioctl()
1540 drvidx = 0; in isdn_ioctl()
1541 if (drvidx == -1) in isdn_ioctl()
1561 strcpy(dev->drv[drvidx]->msn2eaz[i], bname); in isdn_ioctl()
1577 strlen(dev->drv[drvidx]->msn2eaz[i]) ? in isdn_ioctl()
1578 dev->drv[drvidx]->msn2eaz[i] : "_", in isdn_ioctl()
1610 drvidx = -1; in isdn_ioctl()
1613 drvidx = i; in isdn_ioctl()
1617 drvidx = 0; in isdn_ioctl()
1618 if (drvidx == -1) in isdn_ioctl()
1623 c.driver = drvidx; in isdn_ioctl()
1656 int drvidx; in isdn_open() local
1681 drvidx = isdn_minor2drv(minor); in isdn_open()
1682 if (drvidx < 0) in isdn_open()
1685 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING)) in isdn_open()
1687 if (!(dev->drv[drvidx]->online & (1 << chidx))) in isdn_open()
1694 drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL); in isdn_open()
1695 if (drvidx < 0) in isdn_open()
1901 isdn_writebuf_stub(int drvidx, int chan, const u_char * buf, int len, in isdn_writebuf_stub() argument
1905 int hl = dev->drv[drvidx]->interface->hl_hdrlen; in isdn_writebuf_stub()
1915 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb); in isdn_writebuf_stub()
1919 dev->obytes[isdn_dc2minor(drvidx, chan)] += ret; in isdn_writebuf_stub()
1927 isdn_writebuf_skb_stub(int drvidx, int chan, int ack, struct sk_buff *skb) in isdn_writebuf_skb_stub() argument
1932 int idx = isdn_dc2minor(drvidx, chan); in isdn_writebuf_skb_stub()
1948 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, ack, nskb); in isdn_writebuf_skb_stub()
1950 int hl = dev->drv[drvidx]->interface->hl_hdrlen; in isdn_writebuf_skb_stub()
1966 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, ack, skb_tmp); in isdn_writebuf_skb_stub()
1973 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, ack, skb); in isdn_writebuf_skb_stub()
1996 isdn_add_channels(driver *d, int drvidx, int n, int adding) in isdn_add_channels() argument
2073 dev->drvmap[k] = drvidx; in isdn_add_channels()
2089 int drvidx; in set_global_features() local
2092 for (drvidx = 0; drvidx < ISDN_MAX_DRIVERS; drvidx++) { in set_global_features()
2093 if (!dev->drv[drvidx]) in set_global_features()
2095 if (dev->drv[drvidx]->interface) in set_global_features()
2096 dev->global_features |= dev->drv[drvidx]->interface->features; in set_global_features()
2164 int drvidx; in register_isdn() local
2188 for (drvidx = 0; drvidx < ISDN_MAX_DRIVERS; drvidx++) in register_isdn()
2189 if (!dev->drv[drvidx]) in register_isdn()
2191 if (isdn_add_channels(d, drvidx, i->channels, 0)) { in register_isdn()
2195 i->channels = drvidx; in register_isdn()
2199 sprintf(i->id, "line%d", drvidx); in register_isdn()
2202 for (j = 0; j < drvidx; j++) in register_isdn()
2204 sprintf(i->id, "line%d", drvidx); in register_isdn()
2205 dev->drv[drvidx] = d; in register_isdn()
2206 strcpy(dev->drvid[drvidx], i->id); in register_isdn()