tbsdtv / linux_media

TBS linux open source drivers
https://github.com/tbsdtv/linux_media/wiki
Other
174 stars 81 forks source link

si2168 tuner fails to initialize #103

Closed kissg1988 closed 6 years ago

kissg1988 commented 6 years ago

Unfortunately, my TBS7220 card does not work with the open source drivers, because a kernel page fault occurs while initilazing the demodulator driver:

[    8.000548] si2168 14-0064: Silicon Labs Si2168-B40 successfully identified
[    8.000552] si2168 14-0064: firmware version: B 4.0.2
[   11.623281] BUG: unable to handle kernel paging request at 00000006000000b8
[   11.628705] IP: si2168_init+0x2f/0x730 [si2168]
[   11.634077] PGD 0

[   11.644435] Oops: 0000 [#1] SMP
[   11.649495] Modules linked in: fuse sunrpc vfat fat amd_freq_sensitivity edac_mce_amd edac_core kvm_amd kvm ppdev irqbypass snd_hda_codec_realtek crct10dif_pclmul snd_hda_codec_generic crc32_pclmul ghash_clmulni_intel snd_hda_codec_hdmi snd_hda_intel snd_hda_codec si2157 media(OE) snd_hda_core snd_hwdep si2168(OE) snd_seq snd_seq_device fam15h_power snd_pcm k10temp saa716x_tbs_dvb(OE) cx24117(OE) sp5100_tco saa716x_core(OE) tas2101(OE) dvb_core joydev i2c_piix4 i2c_mux snd_timer snd parport_pc soundcore shpchp parport acpi_cpufreq tpm_tis tpm_tis_core tpm amdkfd amd_iommu_v2 radeon i2c_algo_bit crc32c_intel drm_kms_helper ttm serio_raw drm r8169 mii fjes i2c_dev
[   11.687351] CPU: 3 PID: 928 Comm: kdvb-ad-0-fe-0 Tainted: G           OE   4.10.17-200.fc25.x86_64 #1
[   11.694664] Hardware name: ASUS AM1I-A/AM1I-A, BIOS 4.6-2554-ga1b4c94 01/14/2018
[   11.702128] task: ffff94f54203a580 task.stack: ffffa6bf426a4000
[   11.709645] RIP: 0010:si2168_init+0x2f/0x730 [si2168]
[   11.717212] RSP: 0018:ffffa6bf426a7dd0 EFLAGS: 00010246
[   11.724829] RAX: 0000000000000000 RBX: 0000000600000000 RCX: 0000000000000000
[   11.732553] RDX: 0000000000000000 RSI: ffff94f54203c6c0 RDI: ffff94f55af03028
[   11.740225] RBP: ffffa6bf426a7e40 R08: 0000000000000001 R09: 0000000000000000
[   11.748014] R10: 00000002acfa73b7 R11: 0000000000000010 R12: ffff94f55af03028
[   11.755894] R13: ffffa6bf425b7af8 R14: ffff94f55af03028 R15: ffff94f556b50400
[   11.763799] FS:  0000000000000000(0000) GS:ffff94f55fd80000(0000) knlGS:0000000000000000
[   11.771836] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   11.779813] CR2: 00000006000000b8 CR3: 0000000109773000 CR4: 00000000000406e0
[   11.787920] Call Trace:
[   11.795938]  ? set_next_entity+0xc3/0x1a0
[   11.804081]  dvb_frontend_init+0x27/0xb0 [dvb_core]
[   11.812196]  dvb_frontend_thread+0x8c/0x700 [dvb_core]
[   11.820309]  ? __schedule+0x22d/0x6e0
[   11.828362]  kthread+0x109/0x140
[   11.836396]  ? dtv_set_frontend+0x420/0x420 [dvb_core]
[   11.844537]  ? kthread_park+0x90/0x90
[   11.852603]  ret_from_fork+0x2c/0x40
[   11.860491] Code: 00 55 48 89 e5 41 57 41 56 41 55 41 54 49 89 fc 53 48 83 ec 48 48 8b 9f 40 03 00 00 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 <4c> 8b bb b8 00 00 00 0f 1f 44 00 00 45 31 ed 41 80 bf 88 05 00
[   11.877281] RIP: si2168_init+0x2f/0x730 [si2168] RSP: ffffa6bf426a7dd0
[   11.885946] CR2: 00000006000000b8
[   11.894616] ---[ end trace e998de7e38ef474a ]---

I have tried compiling against the stock kernel of Fedora 26 (4.14.13-200.fc26.x86_64) but the same happens.

Not sure what info might be required to provide a proper report so let's start with some generic info:

[root@htpc v4l]# cat /etc/redhat-release
Fedora release 26 (Twenty Six)

[root@htpc ~]# uname -a
Linux htpc.local 4.10.17-200.fc25.x86_64 #1 SMP Mon May 22 18:12:57 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

[root@htpc ~]# lspci -nnvvvv
01:00.0 Multimedia controller [0480]: Philips Semiconductors SAA7160 [1131:7160] (rev 03)
        Subsystem: Device [7220:0001]
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 33
        Region 0: Memory at f0800000 (64-bit, non-prefetchable) [size=1M]
        Capabilities: [40] MSI: Enable+ Count=1/32 Maskable- 64bit+
                Address: 00000000fee0f00c  Data: 41a2
        Capabilities: [50] Express (v1) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <256ns, L1 <1us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE- FLReset- SlotPowerLimit 0.000W
                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 128 bytes
                DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
                LnkCap: Port #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 <64us
                        ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
                LnkCtl: ASPM Disabled; RCB 128 bytes Disabled- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
        Capabilities: [74] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot-,D3cold-)
                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [80] Vendor Specific Information: Len=50 <?>
        Capabilities: [100 v1] Vendor Specific Information: ID=0000 Rev=0 Len=088 <?>
        Kernel driver in use: SAA716x Budget
        Kernel modules: saa716x_tbs_dvb

[root@htpc ~]# lsmod | grep -E '(saa716x_tbs_dvb|si21)'
si2157                 16384  1
media                  40960  1 si2157
si2168                 20480  1
saa716x_tbs_dvb        61440  1
cx24117                36864  1 saa716x_tbs_dvb
saa716x_core           69632  1 saa716x_tbs_dvb
tas2101                24576  1 saa716x_tbs_dvb
dvb_core              126976  2 saa716x_tbs_dvb,saa716x_core
i2c_mux                16384  2 si2168,tas2101
i2c_algo_bit           16384  2 radeon,saa716x_tbs_dvb

If you need some more information or testing fixes I'm happy to help. I hate being locked to a 4.10 kernel just because the closed-source drivers (which work absolutely fine with the current kernel) cannot be compiled against kernel versions newer than 4.10.

Thanks a lot!

kissg1988 commented 6 years ago

Seems like this was just an installation issue, maybe the proprietary and the open source components got mixed up on my system as the issue reported completely disappeared after a reinstall.

What I did was simply deleting the directory "kernel/drivers/media" from the kernel module tree and then re-installing the open source drivers along with the firmware blobs.

After rebooting, the drivers loaded fine, the card has appeared in tvheadend and it works perfectly fine now.