diff options
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c index e38e87c17..9567e00a8 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c @@ -362,6 +362,13 @@ static int dvb_ca_en50221_read_tuple(struct dvb_ca_private* ca, int slot, /* grab the next tuple length and type */ if ((_tupleType = ca->pub->read_attribute_mem(ca->pub, slot, _address)) < 0) return _tupleType; + if (_tupleType == 0xff) { + dprintk("END OF CHAIN TUPLE type:0x%x\n", _tupleType); + *address += 2; + *tupleType = _tupleType; + *tupleLength = 0; + return 0; + } if ((_tupleLength = ca->pub->read_attribute_mem(ca->pub, slot, _address+2)) < 0) return _tupleLength; _address += 4; @@ -982,12 +989,12 @@ static int dvb_ca_en50221_thread(void* data) break; case DVB_CA_SLOTSTATE_VALIDATE: - if (ca->pub->write_cam_control(ca->pub, slot, CTRLIF_COMMAND, CMDREG_RS) != 0) { + if (ca->pub->write_cam_control(ca->pub, slot, CTRLIF_COMMAND, CMDREG_RS) != 0) { printk("dvb_ca: Unable to reset CAM IF\n"); ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_INVALID; - dvb_ca_en50221_thread_update_delay(ca); + dvb_ca_en50221_thread_update_delay(ca); break; - } + } if (dvb_ca_en50221_parse_attributes(ca, slot) != 0) { printk("dvb_ca: Invalid PC card inserted :(\n"); ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_INVALID; |