Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4d8451700171d6bbc254191880f86bfdeec2f74f
Commit:     4d8451700171d6bbc254191880f86bfdeec2f74f
Parent:     ba70d59bb987110c4394e896b299f9726609aa33
Author:     [EMAIL PROTECTED] <[EMAIL PROTECTED]>
AuthorDate: Tue May 1 09:25:56 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Wed May 9 10:12:35 2007 -0300

    V4L/DVB (5578): Workaround for bad hardare/firmware on some pluto2 devices
    
    pluto2_driver: Workaround for pluto2 card reporting wrong number of
    received packets and flooding system with interrupts.
    
    This patch constitutes a workaround for a hardware/firmware problem of the
    pluto2-based card (e.g., Satelco EasyWatch).
    
    It can happen in rare cases that the card gets into a mode where it
    always reports back a number of received packets (nbpackets) which is
    larger than the maximum permissible number of packets (TS_DMA_PACKETS).
    The workaround that is already in the driver in function pluto_dma_end
    reports back zero received packets. In spite of the (in reality) zero
    received packets the card continues to generate interrupts at a very
    high rate, which can effectively stall the system.
    
    The patch resets the TS logic, which puts the card back into normal
    operations.
    
    Signed-off-by: Holger Magnussen <[EMAIL PROTECTED]>
    Signed-off-by: Andreas Oberritter <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 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 058df5c..08a2599 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)
         *     but no packets have been transfered.
         * [2] Sometimes (actually very often) NBPACKETS stays at zero
         *     although one packet has been transfered.
+        * [3] Sometimes (actually rarely), the card gets into an erroneous
+        *     mode where it continuously generates interrupts, claiming it
+        *     has recieved nbpackets>TS_DMA_PACKETS packets, but no packet
+        *     has been transfered. Only a reset seems to solve this
         */
        if ((nbpackets == 0) || (nbpackets > TS_DMA_PACKETS)) {
                unsigned int i = 0;
                while (pluto->dma_buf[i] == 0x47)
                        i += 188;
                nbpackets = i / 188;
+               if (i == 0) {
+                       pluto_reset_ts(pluto, 1);
+                       dev_printk(KERN_DEBUG, &pluto->pdev->dev, "resetting TS 
because of invalid packet counter\n");
+               }
        }
 
        dvb_dmx_swfilter_packets(&pluto->demux, pluto->dma_buf, nbpackets);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to