[PATCH] Fix xc5000 kernel oops when firmware is not found. Was: Re: Pinnacle 800i driver problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 24, 2008 1:57 PM, Steven Toth <stoth@xxxxxxxxxxx> wrote:
> > [   31.400210] cx88[0]/2: cx2388x based DVB/ATSC card
> > [   32.394149] tuner' 0-0064: chip found @ 0xc8 (cx88[0])
> > [   32.421015] DVB: registering new adapter (cx88[0])
> > [   32.446076] Modules linked in: parport_pc pcspkr snd_emu10k1
> > snd_util_mem snd_hwdep snd_seq_dummy snd_via82xx snd_ac97_codec parport
> > snd_seq_oss snd_seq_midi ac97_bus snd_mpu401_uart serio_raw psmouse
> > i2c_viapro s5h1409 snd_rawmidi snd_seq_midi_event tuner tea5767 k8temp
> > cx88_alsa snd_pcm_oss snd_mixer_oss cx88_dvb cx88_vp3054_i2c
> > videobuf_dvb dvb_core snd_seq snd_seq_device tda8290 tda18271 tda827x
> > tuner_xc2028 xc5000 tda9887 tuner_simple mt20xx tea5761 cx8800
> > compat_ioctl32 cx8802 emu10k1_gp gameport snd_pcm snd_timer
> > snd_page_alloc cx88xx ir_common i2c_algo_bit tveeprom videodev
> > v4l2_common i2c_core v4l1_compat videobuf_dma_sg videobuf_core btcx_risc
> > snd soundcore shpchp pci_hotplug amd64_agp agpgart evdev usb_storage
> > libusual 8139too ext3 jbd mbcache sg sd_mod ide_cd cdrom floppy ehci_hcd
> > 8139cp mii uhci_hcd usbcore via82cxxx ide_core ata_generic sata_via
> > libata scsi_mod ohci1394 ieee1394 thermal processor fan fuse apparmor
> > commoncap
> > [   32.446373]  [<f8a74bc0>] cx88_tuner_callback+0x0/0x60 [cx88xx]
> > [   32.446428]  [<f8a76cee>] attach_inform+0xee/0x180 [cx88xx]
> > [   32.446465]  [<f8a74bc0>] cx88_tuner_callback+0x0/0x60 [cx88xx]
> > [   32.447085] cx88[0]/0: registered device video0 [v4l2]
> > [   32.447112] cx88[0]/0: registered device vbi0
> > [   32.448038] cx88[0]/1: CX88x/0: ALSA support for cx2388x boards
>
> I'll look into this oops btw, it shouldn't happen.
>
> - Steve
>

Hi, Steve,

I think I found the problem with the oops when the firmware is not
found. The two line patch below fixes the issue for me.

Signed-off-by: Chaogui Zhang <czhang1974@xxxxxxxxx>

diff -r c9a38585d3a1 linux/drivers/media/dvb/frontends/xc5000.c
--- a/linux/drivers/media/dvb/frontends/xc5000.c        Mon Jan 21
23:03:10 2008 -0500
+++ b/linux/drivers/media/dvb/frontends/xc5000.c        Thu Jan 24
16:10:50 2008 -0500
@@ -577,6 +577,7 @@ static int xc5000_fwupload(struct dvb_fr
        if (ret) {
                printk(KERN_ERR "xc5000: Upload failed. (file not found?)\n");
                ret = XC_RESULT_RESET_FAILURE;
+               goto out;
        } else {
                printk(KERN_INFO "xc5000: firmware read %Zu bytes.\n",
                       fw->size);
@@ -591,6 +592,7 @@ static int xc5000_fwupload(struct dvb_fr
                ret = xc_load_i2c_sequence(fe,  fw->data );
        }

+out:
        release_firmware(fw);
        return ret;
 }

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux