Lines Matching refs:drvidx
70 static int isdn_add_channels(isdn_driver_t *d, int drvidx, int n, int adding);
1069 int drvidx; in isdn_read() local
1103 drvidx = isdn_minor2drv(minor); in isdn_read()
1104 if (drvidx < 0) { in isdn_read()
1108 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING)) { in isdn_read()
1117 len = isdn_readbchan(drvidx, chidx, p, NULL, count, in isdn_read()
1118 &dev->drv[drvidx]->rcv_waitq[chidx]); in isdn_read()
1127 drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL); in isdn_read()
1128 if (drvidx < 0) { in isdn_read()
1132 if (!dev->drv[drvidx]->stavail) { in isdn_read()
1137 interruptible_sleep_on(&(dev->drv[drvidx]->st_waitq)); in isdn_read()
1139 if (dev->drv[drvidx]->interface->readstat) { in isdn_read()
1140 if (count > dev->drv[drvidx]->stavail) in isdn_read()
1141 count = dev->drv[drvidx]->stavail; in isdn_read()
1142 len = dev->drv[drvidx]->interface->readstat(buf, count, in isdn_read()
1143 drvidx, isdn_minor2chan(minor - ISDN_MINOR_CTRL)); in isdn_read()
1152 dev->drv[drvidx]->stavail -= len; in isdn_read()
1154 dev->drv[drvidx]->stavail = 0; in isdn_read()
1175 int drvidx; in isdn_write() local
1187 drvidx = isdn_minor2drv(minor); in isdn_write()
1188 if (drvidx < 0) { in isdn_write()
1192 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING)) { in isdn_write()
1197 while ((retval = isdn_writebuf_stub(drvidx, chidx, buf, count)) == 0) in isdn_write()
1198 interruptible_sleep_on(&dev->drv[drvidx]->snd_waitq[chidx]); in isdn_write()
1202 drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL); in isdn_write()
1203 if (drvidx < 0) { in isdn_write()
1213 if (dev->drv[drvidx]->interface->writecmd) in isdn_write()
1214 retval = dev->drv[drvidx]->interface-> in isdn_write()
1215 writecmd(buf, count, drvidx, in isdn_write()
1238 int drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL); in isdn_poll() local
1250 if (drvidx < 0) { in isdn_poll()
1255 poll_wait(file, &(dev->drv[drvidx]->st_waitq), wait); in isdn_poll()
1257 if (dev->drv[drvidx]->stavail) { in isdn_poll()
1280 int drvidx; in isdn_ioctl() local
1340 drvidx = isdn_minor2drv(minor); in isdn_ioctl()
1341 if (drvidx < 0) in isdn_ioctl()
1344 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING)) in isdn_ioctl()
1516 drvidx = -1; in isdn_ioctl()
1527 drvidx = -1; in isdn_ioctl()
1530 drvidx = i; in isdn_ioctl()
1535 if (drvidx == -1) in isdn_ioctl()
1538 dev->drv[drvidx]->flags |= DRV_FLAG_REJBUS; in isdn_ioctl()
1540 dev->drv[drvidx]->flags &= ~DRV_FLAG_REJBUS; 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()
1638 strcpy(dev->drv[drvidx]->msn2eaz[i], bname); in isdn_ioctl()
1654 strlen(dev->drv[drvidx]->msn2eaz[i]) ? in isdn_ioctl()
1655 dev->drv[drvidx]->msn2eaz[i] : "_", in isdn_ioctl()
1687 drvidx = -1; in isdn_ioctl()
1690 drvidx = i; in isdn_ioctl()
1694 drvidx = 0; in isdn_ioctl()
1695 if (drvidx == -1) in isdn_ioctl()
1700 c.driver = drvidx; in isdn_ioctl()
1745 int drvidx; in isdn_open() local
1770 drvidx = isdn_minor2drv(minor); in isdn_open()
1771 if (drvidx < 0) in isdn_open()
1774 if (!(dev->drv[drvidx]->flags & DRV_FLAG_RUNNING)) in isdn_open()
1776 if (!(dev->drv[drvidx]->online & (1 << chidx))) in isdn_open()
1783 drvidx = isdn_minor2drv(minor - ISDN_MINOR_CTRL); in isdn_open()
1784 if (drvidx < 0) in isdn_open()
1986 isdn_writebuf_stub(int drvidx, int chan, const u_char __user * buf, int len) in isdn_writebuf_stub() argument
1989 int hl = dev->drv[drvidx]->interface->hl_hdrlen; in isdn_writebuf_stub()
1999 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, 1, skb); in isdn_writebuf_stub()
2003 dev->obytes[isdn_dc2minor(drvidx, chan)] += ret; in isdn_writebuf_stub()
2011 isdn_writebuf_skb_stub(int drvidx, int chan, int ack, struct sk_buff *skb) in isdn_writebuf_skb_stub() argument
2016 int idx = isdn_dc2minor(drvidx, chan); in isdn_writebuf_skb_stub()
2032 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, ack, nskb); in isdn_writebuf_skb_stub()
2034 int hl = dev->drv[drvidx]->interface->hl_hdrlen; in isdn_writebuf_skb_stub()
2050 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, ack, skb_tmp); in isdn_writebuf_skb_stub()
2057 ret = dev->drv[drvidx]->interface->writebuf_skb(drvidx, chan, ack, skb); in isdn_writebuf_skb_stub()
2080 isdn_add_channels(isdn_driver_t *d, int drvidx, int n, int adding) in isdn_add_channels() argument
2153 dev->drvmap[k] = drvidx; in isdn_add_channels()
2167 int drvidx; in set_global_features() local
2170 for (drvidx = 0; drvidx < ISDN_MAX_DRIVERS; drvidx++) { in set_global_features()
2171 if (!dev->drv[drvidx]) in set_global_features()
2173 if (dev->drv[drvidx]->interface) in set_global_features()
2174 dev->global_features |= dev->drv[drvidx]->interface->features; in set_global_features()
2240 int drvidx; in register_isdn() local
2264 for (drvidx = 0; drvidx < ISDN_MAX_DRIVERS; drvidx++) in register_isdn()
2265 if (!dev->drv[drvidx]) in register_isdn()
2267 if (isdn_add_channels(d, drvidx, i->channels, 0)) { in register_isdn()
2272 i->channels = drvidx; in register_isdn()
2276 sprintf(i->id, "line%d", drvidx); in register_isdn()
2277 for (j = 0; j < drvidx; j++) in register_isdn()
2279 sprintf(i->id, "line%d", drvidx); in register_isdn()
2280 dev->drv[drvidx] = d; in register_isdn()
2281 strcpy(dev->drvid[drvidx], i->id); in register_isdn()