diff options
Diffstat (limited to 'drivers/media/dvb/pluto2/pluto2.c')
-rw-r--r-- | drivers/media/dvb/pluto2/pluto2.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/dvb/pluto2/pluto2.c b/drivers/media/dvb/pluto2/pluto2.c index 058df5c10034..08a2599ed74a 100644 --- a/drivers/media/dvb/pluto2/pluto2.c +++ b/drivers/media/dvb/pluto2/pluto2.c | |||
@@ -293,12 +293,20 @@ static void pluto_dma_end(struct pluto *pluto, unsigned int nbpackets) | |||
293 | * but no packets have been transfered. | 293 | * but no packets have been transfered. |
294 | * [2] Sometimes (actually very often) NBPACKETS stays at zero | 294 | * [2] Sometimes (actually very often) NBPACKETS stays at zero |
295 | * although one packet has been transfered. | 295 | * although one packet has been transfered. |
296 | * [3] Sometimes (actually rarely), the card gets into an erroneous | ||
297 | * mode where it continuously generates interrupts, claiming it | ||
298 | * has recieved nbpackets>TS_DMA_PACKETS packets, but no packet | ||
299 | * has been transfered. Only a reset seems to solve this | ||
296 | */ | 300 | */ |
297 | if ((nbpackets == 0) || (nbpackets > TS_DMA_PACKETS)) { | 301 | if ((nbpackets == 0) || (nbpackets > TS_DMA_PACKETS)) { |
298 | unsigned int i = 0; | 302 | unsigned int i = 0; |
299 | while (pluto->dma_buf[i] == 0x47) | 303 | while (pluto->dma_buf[i] == 0x47) |
300 | i += 188; | 304 | i += 188; |
301 | nbpackets = i / 188; | 305 | nbpackets = i / 188; |
306 | if (i == 0) { | ||
307 | pluto_reset_ts(pluto, 1); | ||
308 | dev_printk(KERN_DEBUG, &pluto->pdev->dev, "resetting TS because of invalid packet counter\n"); | ||
309 | } | ||
302 | } | 310 | } |
303 | 311 | ||
304 | dvb_dmx_swfilter_packets(&pluto->demux, pluto->dma_buf, nbpackets); | 312 | dvb_dmx_swfilter_packets(&pluto->demux, pluto->dma_buf, nbpackets); |