• Home
  • Raw
  • Download

Lines Matching refs:sl

230 	struct dvb_ca_slot *sl = &ca->slot_info[slot];  in dvb_ca_en50221_check_camstatus()  local
237 return (atomic_read(&sl->camchange_count) != 0); in dvb_ca_en50221_check_camstatus()
245 int cam_present_old = (sl->slot_state != DVB_CA_SLOTSTATE_NONE); in dvb_ca_en50221_check_camstatus()
252 sl->camchange_type = DVB_CA_EN50221_CAMCHANGE_REMOVED; in dvb_ca_en50221_check_camstatus()
254 sl->camchange_type = DVB_CA_EN50221_CAMCHANGE_INSERTED; in dvb_ca_en50221_check_camstatus()
255 atomic_set(&sl->camchange_count, 1); in dvb_ca_en50221_check_camstatus()
257 if ((sl->slot_state == DVB_CA_SLOTSTATE_WAITREADY) && in dvb_ca_en50221_check_camstatus()
260 sl->slot_state = DVB_CA_SLOTSTATE_VALIDATE; in dvb_ca_en50221_check_camstatus()
328 struct dvb_ca_slot *sl = &ca->slot_info[slot]; in dvb_ca_en50221_link_init() local
336 sl->da_irq_supported = 0; in dvb_ca_en50221_link_init()
342 sl->link_buf_size = 2; in dvb_ca_en50221_link_init()
366 sl->link_buf_size = buf_size; in dvb_ca_en50221_link_init()
458 struct dvb_ca_slot *sl; in dvb_ca_en50221_parse_attributes() local
522 sl = &ca->slot_info[slot]; in dvb_ca_en50221_parse_attributes()
523 sl->config_base = 0; in dvb_ca_en50221_parse_attributes()
525 sl->config_base |= (tuple[2 + i] << (8 * i)); in dvb_ca_en50221_parse_attributes()
559 sl->config_option = tuple[0] & 0x3f; in dvb_ca_en50221_parse_attributes()
589 manfid, devid, sl->config_base, sl->config_option); in dvb_ca_en50221_parse_attributes()
603 struct dvb_ca_slot *sl = &ca->slot_info[slot]; in dvb_ca_en50221_set_configoption() local
609 ca->pub->write_attribute_mem(ca->pub, slot, sl->config_base, in dvb_ca_en50221_set_configoption()
610 sl->config_option); in dvb_ca_en50221_set_configoption()
614 sl->config_base); in dvb_ca_en50221_set_configoption()
616 sl->config_option, configoption & 0x3f); in dvb_ca_en50221_set_configoption()
640 struct dvb_ca_slot *sl = &ca->slot_info[slot]; in dvb_ca_en50221_read_data() local
652 if (!sl->rx_buffer.data) { in dvb_ca_en50221_read_data()
656 buf_free = dvb_ringbuffer_free(&sl->rx_buffer); in dvb_ca_en50221_read_data()
658 if (buf_free < (sl->link_buf_size + in dvb_ca_en50221_read_data()
666 (sl->slot_state != DVB_CA_SLOTSTATE_LINKINIT)) { in dvb_ca_en50221_read_data()
703 if (bytes_read > sl->link_buf_size) { in dvb_ca_en50221_read_data()
706 sl->link_buf_size); in dvb_ca_en50221_read_data()
707 sl->slot_state = DVB_CA_SLOTSTATE_LINKINIT; in dvb_ca_en50221_read_data()
714 sl->slot_state = DVB_CA_SLOTSTATE_LINKINIT; in dvb_ca_en50221_read_data()
745 sl->slot_state = DVB_CA_SLOTSTATE_LINKINIT; in dvb_ca_en50221_read_data()
756 if (!sl->rx_buffer.data) { in dvb_ca_en50221_read_data()
760 dvb_ringbuffer_pkt_write(&sl->rx_buffer, buf, bytes_read); in dvb_ca_en50221_read_data()
795 struct dvb_ca_slot *sl = &ca->slot_info[slot]; in dvb_ca_en50221_write_data() local
802 if (bytes_write > sl->link_buf_size) in dvb_ca_en50221_write_data()
806 (sl->slot_state != DVB_CA_SLOTSTATE_LINKINIT)) in dvb_ca_en50221_write_data()
888 sl->slot_state = DVB_CA_SLOTSTATE_LINKINIT; in dvb_ca_en50221_write_data()
943 struct dvb_ca_slot *sl = &ca->slot_info[slot]; in dvb_ca_en50221_camchange_irq() local
956 sl->camchange_type = change_type; in dvb_ca_en50221_camchange_irq()
957 atomic_inc(&sl->camchange_count); in dvb_ca_en50221_camchange_irq()
971 struct dvb_ca_slot *sl = &ca->slot_info[slot]; in dvb_ca_en50221_camready_irq() local
975 if (sl->slot_state == DVB_CA_SLOTSTATE_WAITREADY) { in dvb_ca_en50221_camready_irq()
976 sl->slot_state = DVB_CA_SLOTSTATE_VALIDATE; in dvb_ca_en50221_camready_irq()
991 struct dvb_ca_slot *sl = &ca->slot_info[slot]; in dvb_ca_en50221_frda_irq() local
996 switch (sl->slot_state) { in dvb_ca_en50221_frda_irq()
1001 sl->da_irq_supported = 1; in dvb_ca_en50221_frda_irq()
1046 struct dvb_ca_slot *sl = &ca->slot_info[slot]; in dvb_ca_en50221_thread_update_delay() local
1048 switch (sl->slot_state) { in dvb_ca_en50221_thread_update_delay()
1074 if ((!sl->da_irq_supported) || in dvb_ca_en50221_thread_update_delay()
1129 struct dvb_ca_slot *sl = &ca->slot_info[slot]; in dvb_ca_en50221_thread_state_machine() local
1134 mutex_lock(&sl->slot_lock); in dvb_ca_en50221_thread_state_machine()
1139 if (sl->slot_state != DVB_CA_SLOTSTATE_NONE) in dvb_ca_en50221_thread_state_machine()
1143 if (sl->camchange_type == DVB_CA_EN50221_CAMCHANGE_INSERTED) in dvb_ca_en50221_thread_state_machine()
1144 sl->slot_state = DVB_CA_SLOTSTATE_UNINITIALISED; in dvb_ca_en50221_thread_state_machine()
1148 atomic_dec(&sl->camchange_count); in dvb_ca_en50221_thread_state_machine()
1152 switch (sl->slot_state) { in dvb_ca_en50221_thread_state_machine()
1159 sl->slot_state = DVB_CA_SLOTSTATE_WAITREADY; in dvb_ca_en50221_thread_state_machine()
1161 sl->timeout = jiffies + (INIT_TIMEOUT_SECS * HZ); in dvb_ca_en50221_thread_state_machine()
1165 if (time_after(jiffies, sl->timeout)) { in dvb_ca_en50221_thread_state_machine()
1168 sl->slot_state = DVB_CA_SLOTSTATE_INVALID; in dvb_ca_en50221_thread_state_machine()
1185 sl->slot_state = DVB_CA_SLOTSTATE_INVALID; in dvb_ca_en50221_thread_state_machine()
1192 sl->slot_state = DVB_CA_SLOTSTATE_INVALID; in dvb_ca_en50221_thread_state_machine()
1201 sl->slot_state = DVB_CA_SLOTSTATE_INVALID; in dvb_ca_en50221_thread_state_machine()
1207 sl->timeout = jiffies + (INIT_TIMEOUT_SECS * HZ); in dvb_ca_en50221_thread_state_machine()
1208 sl->slot_state = DVB_CA_SLOTSTATE_WAITFR; in dvb_ca_en50221_thread_state_machine()
1213 if (time_after(jiffies, sl->timeout)) { in dvb_ca_en50221_thread_state_machine()
1216 sl->slot_state = DVB_CA_SLOTSTATE_INVALID; in dvb_ca_en50221_thread_state_machine()
1223 sl->slot_state = DVB_CA_SLOTSTATE_LINKINIT; in dvb_ca_en50221_thread_state_machine()
1235 sl->slot_state = DVB_CA_SLOTSTATE_UNINITIALISED; in dvb_ca_en50221_thread_state_machine()
1240 if (!sl->rx_buffer.data) { in dvb_ca_en50221_thread_state_machine()
1245 sl->slot_state = DVB_CA_SLOTSTATE_INVALID; in dvb_ca_en50221_thread_state_machine()
1249 dvb_ringbuffer_init(&sl->rx_buffer, rxbuf, in dvb_ca_en50221_thread_state_machine()
1254 sl->slot_state = DVB_CA_SLOTSTATE_RUNNING; in dvb_ca_en50221_thread_state_machine()
1296 mutex_unlock(&sl->slot_lock); in dvb_ca_en50221_thread_state_machine()
1362 struct dvb_ca_slot *sl = &ca->slot_info[slot]; in dvb_ca_en50221_io_do_ioctl() local
1364 mutex_lock(&sl->slot_lock); in dvb_ca_en50221_io_do_ioctl()
1365 if (sl->slot_state != DVB_CA_SLOTSTATE_NONE) { in dvb_ca_en50221_io_do_ioctl()
1372 mutex_unlock(&sl->slot_lock); in dvb_ca_en50221_io_do_ioctl()
1390 struct dvb_ca_slot *sl; in dvb_ca_en50221_io_do_ioctl() local
1401 sl = &ca->slot_info[slot]; in dvb_ca_en50221_io_do_ioctl()
1402 if ((sl->slot_state != DVB_CA_SLOTSTATE_NONE) && in dvb_ca_en50221_io_do_ioctl()
1403 (sl->slot_state != DVB_CA_SLOTSTATE_INVALID)) { in dvb_ca_en50221_io_do_ioctl()
1406 if (sl->slot_state == DVB_CA_SLOTSTATE_RUNNING) in dvb_ca_en50221_io_do_ioctl()
1452 struct dvb_ca_slot *sl; in dvb_ca_en50221_io_write() local
1481 sl = &ca->slot_info[slot]; in dvb_ca_en50221_io_write()
1484 if (sl->slot_state != DVB_CA_SLOTSTATE_RUNNING) in dvb_ca_en50221_io_write()
1489 fraglen = sl->link_buf_size - 2; in dvb_ca_en50221_io_write()
1512 if (sl->slot_state != DVB_CA_SLOTSTATE_RUNNING) { in dvb_ca_en50221_io_write()
1517 mutex_lock(&sl->slot_lock); in dvb_ca_en50221_io_write()
1520 mutex_unlock(&sl->slot_lock); in dvb_ca_en50221_io_write()
1559 struct dvb_ca_slot *sl = &ca->slot_info[slot]; in dvb_ca_en50221_io_read_condition() local
1561 if (sl->slot_state != DVB_CA_SLOTSTATE_RUNNING) in dvb_ca_en50221_io_read_condition()
1564 if (!sl->rx_buffer.data) in dvb_ca_en50221_io_read_condition()
1567 idx = dvb_ringbuffer_pkt_next(&sl->rx_buffer, -1, &fraglen); in dvb_ca_en50221_io_read_condition()
1569 dvb_ringbuffer_pkt_read(&sl->rx_buffer, idx, 0, hdr, 2); in dvb_ca_en50221_io_read_condition()
1579 idx = dvb_ringbuffer_pkt_next(&sl->rx_buffer, idx, in dvb_ca_en50221_io_read_condition()
1607 struct dvb_ca_slot *sl; in dvb_ca_en50221_io_read() local
1646 sl = &ca->slot_info[slot]; in dvb_ca_en50221_io_read()
1647 idx = dvb_ringbuffer_pkt_next(&sl->rx_buffer, -1, &fraglen); in dvb_ca_en50221_io_read()
1657 dvb_ringbuffer_pkt_read(&sl->rx_buffer, idx, 0, hdr, 2); in dvb_ca_en50221_io_read()
1668 dvb_ringbuffer_pkt_read_user(&sl->rx_buffer, in dvb_ca_en50221_io_read()
1683 idx2 = dvb_ringbuffer_pkt_next(&sl->rx_buffer, idx, &fraglen); in dvb_ca_en50221_io_read()
1685 dvb_ringbuffer_pkt_dispose(&sl->rx_buffer, idx); in dvb_ca_en50221_io_read()
1740 struct dvb_ca_slot *sl = &ca->slot_info[i]; in dvb_ca_en50221_io_open() local
1742 if (sl->slot_state == DVB_CA_SLOTSTATE_RUNNING) { in dvb_ca_en50221_io_open()
1743 if (!sl->rx_buffer.data) { in dvb_ca_en50221_io_open()
1749 dvb_ringbuffer_flush(&sl->rx_buffer); in dvb_ca_en50221_io_open()
1912 struct dvb_ca_slot *sl = &ca->slot_info[i]; in dvb_ca_en50221_init() local
1914 memset(sl, 0, sizeof(struct dvb_ca_slot)); in dvb_ca_en50221_init()
1915 sl->slot_state = DVB_CA_SLOTSTATE_NONE; in dvb_ca_en50221_init()
1916 atomic_set(&sl->camchange_count, 0); in dvb_ca_en50221_init()
1917 sl->camchange_type = DVB_CA_EN50221_CAMCHANGE_REMOVED; in dvb_ca_en50221_init()
1918 mutex_init(&sl->slot_lock); in dvb_ca_en50221_init()