Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 607796 - sys-kernel/gentoo-sources-4.9.5 - oops in em28174 driver
Summary: sys-kernel/gentoo-sources-4.9.5 - oops in em28174 driver
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-31 12:39 UTC by Jiri Pittner
Modified: 2017-10-05 11:51 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Pittner 2017-01-31 12:39:47 UTC
After upgrading to 4.9.5 kernel and plugging an USB DVB adapter, kernel Oops happened, see log below
Previously using 4.7.4 without any problem.






Reproducible: Always

Steps to Reproduce:
1. compile and boot 4.9.5
2. insert DVB USB stick based on em28xx
3. look at kern.log
Actual Results:  

Jan 30 21:22:51 jp kernel: usb 1-1.2: Product: PCTV 290e
Jan 30 21:22:51 jp kernel: usb 1-1.2: Manufacturer: PCTV Systems
Jan 30 21:22:51 jp kernel: usb 1-1.2: SerialNumber: 00000006LKZU
Jan 30 21:22:53 jp kernel: em28xx: New device PCTV Systems PCTV 290e @ 480 Mbps (2013:024f, interface 0, class 0)
Jan 30 21:22:53 jp kernel: em28xx: DVB interface 0 found: isoc
Jan 30 21:22:53 jp kernel: em28xx: chip ID is em28174
Jan 30 21:22:53 jp kernel: em28174 #0: EEPROM ID = 26 00 01 00, EEPROM hash = 0x5efb2edd
Jan 30 21:22:53 jp kernel: em28174 #0: EEPROM info:
Jan 30 21:22:53 jp kernel: em28174 #0: \x09microcode start address = 0x0004, boot configuration = 0x01
Jan 30 21:22:53 jp kernel: em28174 #0: \x09No audio on board.
Jan 30 21:22:53 jp kernel: em28174 #0: \x09500mA max power
Jan 30 21:22:53 jp kernel: em28174 #0: \x09Table at offset 0x39, strings=0x1aa0, 0x14ba, 0x1ace
Jan 30 21:22:53 jp kernel: em28174 #0: Identified as PCTV nanoStick T2 290e (card=78)
Jan 30 21:22:53 jp kernel: em28174 #0: dvb set to isoc mode.
Jan 30 21:22:53 jp kernel: usbcore: registered new interface driver em28xx
Jan 30 21:22:53 jp kernel: em28174 #0: Binding DVB extension
Jan 30 21:22:53 jp kernel: BUG: unable to handle kernel NULL pointer dereference at 0000000000000549
Jan 30 21:22:53 jp kernel: IP: [<ffffffff8157827c>] memcmp+0xc/0x40
Jan 30 21:22:53 jp kernel: PGD 47e9ff067
Jan 30 21:22:53 jp kernel: PUD 47d522067
Jan 30 21:22:53 jp kernel: PMD 0
Jan 30 21:22:53 jp kernel: 
Jan 30 21:22:53 jp kernel: Oops: 0000 [#1] SMP
Jan 30 21:22:53 jp kernel: Modules linked in: cxd2820r em28xx_dvb(+) dvb_core em28xx tveeprom v4l2_common rfcomm vboxnetflt(O) vboxnetadp(O) vboxdrv(O) snd_pcm_oss snd_mixer_oss bnep uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 btusb videobuf2_core btrtl btbcm btintel videodev bluetooth media ax88179_178a snd_hda_codec_hdmi nvidia_drm(PO) nvidia_modeset(PO) nvidia(PO) snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal snd_hda_intel iwlwifi snd_hda_codec snd_hda_core snd_hwdep snd_pcm mei_me snd_timer mei
Jan 30 21:22:53 jp kernel: CPU: 0 PID: 30175 Comm: modprobe Tainted: P           O    4.9.5-gentoo #1
Jan 30 21:22:53 jp kernel: Hardware name: Hewlett-Packard HP ZBook 15 G2/2253, BIOS M70 Ver. 01.08 03/16/2015
Jan 30 21:22:53 jp kernel: task: ffff88048b12b500 task.stack: ffffc90001d9c000
Jan 30 21:22:53 jp kernel: RIP: 0010:[<ffffffff8157827c>]  [<ffffffff8157827c>] memcmp+0xc/0x40
Jan 30 21:22:53 jp kernel: RSP: 0018:ffffc90001d9f818  EFLAGS: 00010206
Jan 30 21:22:53 jp kernel: RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000000000
Jan 30 21:22:53 jp kernel: RDX: 0000000000000003 RSI: 0000000000000549 RDI: ffffc90001d9f869
Jan 30 21:22:53 jp kernel: RBP: ffffc90001d9f818 R08: 000000000001afc0 R09: ffff88048d003b00
Jan 30 21:22:53 jp kernel: R10: 0000000000000000 R11: 000000000001b688 R12: 0000000000000549
Jan 30 21:22:53 jp kernel: R13: ffff88047a367400 R14: ffffc90001d9f869 R15: ffffc90001d9fa88
Jan 30 21:22:53 jp kernel: FS:  00007f294eb87700(0000) GS:ffff88049dc00000(0000) knlGS:0000000000000000
Jan 30 21:22:53 jp kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jan 30 21:22:53 jp kernel: CR2: 0000000000000549 CR3: 000000047dc13000 CR4: 00000000001406f0
Jan 30 21:22:53 jp kernel: Stack:
Jan 30 21:22:53 jp kernel:  ffffc90001d9f858 ffffffffa00d5592 ffffc90001d9f858 ffff88047d71d800
Jan 30 21:22:53 jp kernel:  000000007a364000 ffff88047a367400 ffff88047d71d828 ffffc90001d9fa88
Jan 30 21:22:53 jp kernel:  ffffc90001d9f898 ffffffffa00d57e5 000000e1000001e3 ffffffffa00d74c0
Jan 30 21:22:53 jp kernel: Call Trace:
Jan 30 21:22:53 jp kernel:  [<ffffffffa00d5592>] cxd2820r_gpio+0x32/0x120 [cxd2820r]
Jan 30 21:22:53 jp kernel:  [<ffffffffa00d57e5>] cxd2820r_probe+0x165/0x200 [cxd2820r]
Jan 30 21:22:53 jp kernel:  [<ffffffffa00d5680>] ? cxd2820r_gpio+0x120/0x120 [cxd2820r]
Jan 30 21:22:53 jp kernel:  [<ffffffff818daaaa>] i2c_device_probe+0xca/0x120
Jan 30 21:22:53 jp kernel:  [<ffffffff81776fc9>] driver_probe_device+0x189/0x2d0
Jan 30 21:22:53 jp kernel:  [<ffffffff81777248>] __device_attach_driver+0x78/0x90
Jan 30 21:22:53 jp kernel:  [<ffffffff817771d0>] ? driver_allows_async_probing+0x30/0x30
Jan 30 21:22:53 jp kernel:  [<ffffffff817750f6>] bus_for_each_drv+0x56/0x90
Jan 30 21:22:53 jp kernel:  [<ffffffff81776d56>] __device_attach+0xb6/0x110
Jan 30 21:22:53 jp kernel:  [<ffffffff817773de>] device_initial_probe+0xe/0x10
Jan 30 21:22:53 jp kernel:  [<ffffffff8177633d>] bus_probe_device+0x8d/0xa0
Jan 30 21:22:53 jp kernel:  [<ffffffff81774418>] device_add+0x428/0x5f0
Jan 30 21:22:53 jp kernel:  [<ffffffff817745f5>] device_register+0x15/0x20
Jan 30 21:22:53 jp kernel:  [<ffffffff818dd714>] i2c_new_device+0x194/0x200
Jan 30 21:22:53 jp kernel:  [<ffffffffa00d51be>] cxd2820r_attach+0x7e/0xb0 [cxd2820r]
Jan 30 21:22:53 jp kernel:  [<ffffffff81166501>] ? each_symbol_section+0xd1/0x140
Jan 30 21:22:53 jp kernel:  [<ffffffffa00b9000>] ? 0xffffffffa00b9000
Jan 30 21:22:53 jp kernel:  [<ffffffffa00b3710>] em28xx_dvb_init.part.3+0xb26/0x33a6 [em28xx_dvb]
Jan 30 21:22:53 jp kernel:  [<ffffffff811197ed>] ? default_wake_function+0xd/0x10
Jan 30 21:22:53 jp kernel:  [<ffffffff8112db2d>] ? __wake_up_common+0x4d/0x80
Jan 30 21:22:53 jp kernel:  [<ffffffff8126b9d8>] ? ep_poll_callback+0xe8/0x1d0
Jan 30 21:22:53 jp kernel:  [<ffffffff8112db2d>] ? __wake_up_common+0x4d/0x80
Jan 30 21:22:53 jp kernel:  [<ffffffff8112dcef>] ? __wake_up+0x3f/0x50
Jan 30 21:22:53 jp kernel:  [<ffffffffa00b9000>] ? 0xffffffffa00b9000
Jan 30 21:22:53 jp kernel:  [<ffffffffa00b276e>] em28xx_dvb_init+0x1e/0x20 [em28xx_dvb]
Jan 30 21:22:53 jp kernel:  [<ffffffffa0089092>] em28xx_register_extension+0x52/0x90 [em28xx]
Jan 30 21:22:53 jp kernel:  [<ffffffffa00b901e>] em28xx_dvb_register+0x1e/0x42 [em28xx_dvb]
Jan 30 21:22:53 jp kernel:  [<ffffffff8100040c>] do_one_initcall+0x3c/0x160
Jan 30 21:22:53 jp kernel:  [<ffffffff8121ee03>] ? kmem_cache_alloc_trace+0x33/0x140
Jan 30 21:22:53 jp kernel:  [<ffffffff811cc207>] do_init_module+0x5b/0x1cb
Jan 30 21:22:53 jp kernel:  [<ffffffff8116995a>] load_module+0x1f2a/0x2270
Jan 30 21:22:53 jp kernel:  [<ffffffff811669a0>] ? __symbol_put+0x30/0x30
Jan 30 21:22:53 jp kernel:  [<ffffffff8122fa1d>] ? kernel_read_file+0x16d/0x190
Jan 30 21:22:53 jp kernel:  [<ffffffff8122faf4>] ? kernel_read_file_from_fd+0x44/0x70
Jan 30 21:22:53 jp kernel:  [<ffffffff81169e60>] SYSC_finit_module+0xa0/0xb0
Jan 30 21:22:53 jp kernel:  [<ffffffff81169e89>] SyS_finit_module+0x9/0x10
Jan 30 21:22:53 jp kernel:  [<ffffffff81c762a0>] entry_SYSCALL_64_fastpath+0x13/0x94
Jan 30 21:22:53 jp kernel: Code: c0 01 48 63 c8 48 39 f1 73 09 48 8b 0c cf 48 85 c9 75 cf b8 ea ff ff ff 5d c3 0f 1f 44 00 00 55 48 85 d2 48 89 e5 74 33 0f b6 07 <0f> b6 0e 29 c8 75 22 48 83 ea 01 31 c9 eb 15 44 0f b6 44 0f 01
Jan 30 21:22:53 jp kernel: RIP  [<ffffffff8157827c>] memcmp+0xc/0x40
Jan 30 21:22:53 jp kernel:  RSP <ffffc90001d9f818>
Jan 30 21:22:53 jp kernel: CR2: 0000000000000549
Jan 30 21:22:53 jp kernel: ---[ end trace 217a9723ab3aff61 ]---
Jan 30 21:32:45 jp kernel: kworker/dying (17520) used greatest stack depth: 12112 bytes left
J


Expected Results:  
Correctly working in 4.7.4: /dev/dvb/adapter0 appears, mplayer dvb:// works


 emerge --info
Portage 2.3.3 (python 2.7.12-final-0, default/linux/amd64/13.0, gcc-4.9.4, glibc-2.23-r3, 4.7.4-gentoo x86_64)
=================================================================
System uname: Linux-4.7.4-gentoo-x86_64-Intel-R-_Core-TM-_i7-4810MQ_CPU_@_2.80GHz-with-gentoo-2.3
KiB Mem:    16341896 total,   2131996 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Tue, 31 Jan 2017 11:30:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.22.3_rc4::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.23.2::gentoo
sys-apps/sandbox:         2.10-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.5.4::gentoo, 4.8.5::gentoo, 4.9.3::gentoo, 4.9.4::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 0

crossdev
    location: /opt/portage
    masters: gentoo science
    priority: 1

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -mtune=native -fno-omit-frame-pointer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/config /usr/share/gnupg/qualified.txt /var/bind /var/lib/hsqldb /var/lib/i2pd/certificates"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -mtune=native -fno-omit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.supp.name/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo.mirror.dkm.cz/pub/gentoo/ ftp://gentoo.mirror.dkm.cz/pub/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp.sh.cvut.cz/MIRRORS/gentoo ftp://mirror.switch.ch/mirror/gentoo/ http://gentoo.supp.name/ rsync://gentoo.mirror.dkm.cz/gentoo/ http://gentoo.mirror.web4u.cz/"
LANG="C"
LC_ALL="czech"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/scratch/tmp"
USE="X acl aes alsa amd64 berkdb bzip2 cli cracklib crypt cxx dri fortran gcj gdbm hal iconv ipv6 lapack latex mbox mmx modules multilib multislot ncurses nls nptl openmp pam pcre readline seccomp session sse sse2 sse3 sse4 ssl static-libs systemtap tcpd tetex unicode xattr zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="cs de en nl sk" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau vesa nv fbdev v4l vga" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON


excerpt from .config:CONFIG_DVB_USB=m
# CONFIG_DVB_USB_DEBUG is not set
CONFIG_DVB_USB_DIB3000MC=m
CONFIG_DVB_USB_A800=m
CONFIG_DVB_USB_DIBUSB_MB=m
# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
CONFIG_DVB_USB_DIBUSB_MC=m
CONFIG_DVB_USB_DIB0700=m
CONFIG_DVB_USB_UMT_010=m
CONFIG_DVB_USB_CXUSB=m
CONFIG_DVB_USB_M920X=m
CONFIG_DVB_USB_DIGITV=m
CONFIG_DVB_USB_VP7045=m
CONFIG_DVB_USB_VP702X=m
CONFIG_DVB_USB_GP8PSK=m
CONFIG_DVB_USB_NOVA_T_USB2=m
CONFIG_DVB_USB_TTUSB2=m
CONFIG_DVB_USB_DTT200U=m
CONFIG_DVB_USB_OPERA1=m
CONFIG_DVB_USB_AF9005=m
CONFIG_DVB_USB_AF9005_REMOTE=m
CONFIG_DVB_USB_PCTV452E=m
CONFIG_DVB_USB_DW2102=m
CONFIG_DVB_USB_CINERGY_T2=m
CONFIG_DVB_USB_DTV5100=m
CONFIG_DVB_USB_FRIIO=m
CONFIG_DVB_USB_AZ6027=m
CONFIG_DVB_USB_TECHNISAT_USB2=m
CONFIG_DVB_USB_V2=m
CONFIG_DVB_USB_AF9015=m
CONFIG_DVB_USB_AF9035=m
CONFIG_DVB_USB_ANYSEE=m
CONFIG_DVB_USB_AU6610=m
CONFIG_DVB_USB_AZ6007=m
CONFIG_DVB_USB_CE6230=m
CONFIG_DVB_USB_EC168=m
CONFIG_DVB_USB_GL861=m
CONFIG_DVB_USB_LME2510=m
CONFIG_DVB_USB_MXL111SF=m
CONFIG_DVB_USB_RTL28XXU=m
CONFIG_DVB_USB_DVBSKY=m
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
CONFIG_SMS_USB_DRV=m
CONFIG_DVB_B2C2_FLEXCOP_USB=m
# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set
CONFIG_DVB_AS102=m


CONFIG_VIDEO_EM28XX=m
CONFIG_VIDEO_EM28XX_V4L2=m
CONFIG_VIDEO_EM28XX_ALSA=m
CONFIG_VIDEO_EM28XX_DVB=m
CONFIG_VIDEO_EM28XX_RC=m
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
CONFIG_MEDIA_RADIO_SUPPORT=y
CONFIG_MEDIA_SDR_SUPPORT=y
CONFIG_MEDIA_RC_SUPPORT=y
CONFIG_MEDIA_CONTROLLER=y
# CONFIG_MEDIA_CONTROLLER_DVB is not set
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L2_SUBDEV_API=y
CONFIG_VIDEO_V4L2=m
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
# CONFIG_VIDEO_PCI_SKELETON is not set
CONFIG_VIDEO_TUNER=m
CONFIG_V4L2_MEM2MEM_DEV=m
CONFIG_VIDEOBUF_GEN=m
CONFIG_VIDEOBUF_DMA_SG=m
CONFIG_VIDEOBUF_VMALLOC=m
CONFIG_VIDEOBUF_DVB=m
CONFIG_VIDEOBUF2_CORE=m
CONFIG_VIDEOBUF2_MEMOPS=m
CONFIG_VIDEOBUF2_DMA_CONTIG=m
CONFIG_VIDEOBUF2_VMALLOC=m
CONFIG_VIDEOBUF2_DMA_SG=m
CONFIG_VIDEOBUF2_DVB=m
CONFIG_DVB_CORE=m
CONFIG_DVB_NET=y
CONFIG_TTPCI_EEPROM=m
CONFIG_DVB_MAX_ADAPTERS=8
CONFIG_DVB_DYNAMIC_MINORS=y
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2017-02-06 14:12:26 UTC
Do you have CONFIG_GPIOLIB=y in kernel? If not please try to enable GPIOLIB in the kernel (Device Drivers -> GPIO support). See https://www.mail-archive.com/linux-media@vger.kernel.org/msg107132.html
Comment 2 Jiri Pittner 2017-02-06 19:26:44 UTC
I did not have CONFIG_GPIOLIB defined before.
After kernel rebuild with this option, the problem is only partially solved,
depends on the particular adapter:
DVB-T adapter works:
[   44.997169] usb 1-1.2: Product: PCTV 290e
[   44.997170] usb 1-1.2: Manufacturer: PCTV Systems
[   44.997171] usb 1-1.2: SerialNumber: 00000006LKZU
[   46.220692] em28xx: New device PCTV Systems PCTV 290e @ 480 Mbps (2013:024f, interface 0, class 0)
[   46.220694] em28xx: DVB interface 0 found: isoc
[   46.220787] em28xx: chip ID is em28174
[   46.556470] em28174 #0: EEPROM ID = 26 00 01 00, EEPROM hash = 0x5efb2edd
[   46.556472] em28174 #0: EEPROM info:
[   46.556473] em28174 #0:      microcode start address = 0x0004, boot configuration = 0x01
[   46.581722] em28174 #0:      No audio on board.
[   46.581723] em28174 #0:      500mA max power
[   46.581724] em28174 #0:      Table at offset 0x39, strings=0x1aa0, 0x14ba, 0x1ace
[   46.581764] em28174 #0: Identified as PCTV nanoStick T2 290e (card=78)
[   46.581765] em28174 #0: dvb set to isoc mode.
[   46.581857] usbcore: registered new interface driver em28xx
[   46.585491] em28174 #0: Binding DVB extension
[   46.589169] cxd2820r 13-006c: Sony CXD2820R successfully identified
[   46.590403] tda18271 13-0060: creating new instance
[   46.599845] tda18271: TDA18271HD/C2 detected @ 13-0060
[   46.797320] DVB: registering new adapter (em28174 #0)
[   46.797325] usb 1-1.2: DVB: registering adapter 0 frontend 0 (Sony CXD2820R)...
[   46.797584] em28174 #0: DVB extension successfully initialized



However, DVB-S from Pinnacle does NOT work, this time having some problem
with loading firmware blob to the device:

[  106.617062] usb 1-1.2: new high-speed USB device number 12 using ehci-pci
[  106.695497] usb 1-1.2: New USB device found, idVendor=2304, idProduct=0222
[  106.695499] usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  107.916137] dvb-usb: found a 'Pinnacle 450e DVB-S USB2.0' in cold state, will try to load a firmware
[  107.916737] dvb-usb: downloading firmware from file 'dvb-usb-pctv-400e-01.fw'
[  107.916740] ------------[ cut here ]------------
[  107.916744] WARNING: CPU: 2 PID: 5529 at drivers/usb/core/hcd.c:1584 usb_hcd_map_urb_for_dma+0x3a3/0x550
[  107.916745] transfer buffer not dma capable
[  107.916745] Modules linked in: dvb_usb_ttusb2(+) dvb_usb rc_pinnacle_pctv_hd em28xx_rc rc_core tda18271 cxd2820r em28xx_dvb dvb_core em28xx tveeprom v4l2_common rfcomm vboxnetflt(O) vboxnetadp(O) vboxdrv(O) snd_pcm_oss snd_mixer_oss bnep uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core btusb btrtl videodev btbcm btintel media bluetooth ax88179_178a snd_hda_codec_hdmi nvidia_drm(PO) nvidia_modeset(PO) nvidia(PO) snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal snd_hda_intel snd_hda_codec iwlwifi snd_hda_core snd_hwdep snd_pcm mei_me snd_timer mei
[  107.916763] CPU: 2 PID: 5529 Comm: systemd-udevd Tainted: P           O    4.9.5-gentoo #2
[  107.916764] Hardware name: Hewlett-Packard HP ZBook 15 G2/2253, BIOS M70 Ver. 01.08 03/16/2015
[  107.916765]  ffffc900024fb6a0 ffffffff8156fd68 ffffc900024fb6f0 0000000000000000
[  107.916767]  ffffc900024fb6e0 ffffffff810f227c 0000063000000001 ffff88047c3cdd80
[  107.916769]  00000000fffffff5 0000000000000000 0000000000000001 ffff88048988b800
[  107.916770] Call Trace:
[  107.916774]  [<ffffffff8156fd68>] dump_stack+0x4d/0x65
[  107.916775]  [<ffffffff810f227c>] __warn+0xcc/0xf0
[  107.916776]  [<ffffffff810f22ea>] warn_slowpath_fmt+0x4a/0x50
[  107.916778]  [<ffffffff8188c353>] usb_hcd_map_urb_for_dma+0x3a3/0x550
[  107.916781]  [<ffffffff81c78ac8>] ? io_schedule_timeout+0xd8/0x110
[  107.916783]  [<ffffffff8188c68c>] usb_hcd_submit_urb+0x18c/0x900
[  107.916784]  [<ffffffff81c79533>] ? __wait_on_bit+0x73/0x90
[  107.916787]  [<ffffffff81245bb0>] ? touch_atime+0x20/0xa0
[  107.916788]  [<ffffffff8188da72>] usb_submit_urb+0x282/0x530
[  107.916790]  [<ffffffff8188e48a>] usb_start_wait_urb+0x5a/0xe0
[  107.916791]  [<ffffffff8188e5cc>] usb_control_msg+0xbc/0xf0
[  107.916793]  [<ffffffffa004803d>] usb_cypress_writemem+0x3d/0x40 [dvb_usb]
[  107.916795]  [<ffffffffa00481df>] usb_cypress_load_firmware+0x4f/0x140 [dvb_usb]
[  107.916797]  [<ffffffff8113d3b0>] ? console_unlock+0x520/0x550
[  107.916798]  [<ffffffff8113d653>] ? vprintk_emit+0x273/0x430
[  107.916799]  [<ffffffff8113d99a>] ? vprintk_default+0x1a/0x20
[  107.916801]  [<ffffffff811cbf63>] ? printk+0x43/0x4b
[  107.916803]  [<ffffffffa0048334>] dvb_usb_download_firmware+0x64/0xd0 [dvb_usb]
[  107.916804]  [<ffffffffa00488a7>] dvb_usb_device_init+0x3c7/0x6a0 [dvb_usb]
[  107.916806]  [<ffffffffa0066564>] ttusb2_probe+0x24/0x80 [dvb_usb_ttusb2]
[  107.916807]  [<ffffffff81892748>] usb_probe_interface+0xf8/0x290
[  107.916810]  [<ffffffff8177cff8>] driver_probe_device+0x218/0x2d0
[  107.916811]  [<ffffffff8177d13e>] __driver_attach+0x8e/0x90
[  107.916813]  [<ffffffff8177d0b0>] ? driver_probe_device+0x2d0/0x2d0
[  107.916814]  [<ffffffff8177afef>] bus_for_each_dev+0x5f/0x90
[  107.916816]  [<ffffffff8177c9b9>] driver_attach+0x19/0x20
[  107.916817]  [<ffffffff8177c5e0>] bus_add_driver+0x1b0/0x230
[  107.916818]  [<ffffffff8177dabb>] driver_register+0x5b/0xe0
[  107.916819]  [<ffffffff8189121d>] usb_register_driver+0x7d/0x150
[  107.916820]  [<ffffffffa004d000>] ? 0xffffffffa004d000
[  107.916822]  [<ffffffffa004d029>] ttusb2_driver_init+0x29/0x50 [dvb_usb_ttusb2]
[  107.916823]  [<ffffffff8100040c>] do_one_initcall+0x3c/0x160
[  107.916825]  [<ffffffff8120970c>] ? __vunmap+0x7c/0xd0
[  107.916828]  [<ffffffff8121ee03>] ? kmem_cache_alloc_trace+0x33/0x140
[  107.916829]  [<ffffffff811cc207>] do_init_module+0x5b/0x1cb
[  107.916831]  [<ffffffff8116995a>] load_module+0x1f2a/0x2270
[  107.916833]  [<ffffffff811669a0>] ? __symbol_put+0x30/0x30
[  107.916835]  [<ffffffff8122fa1d>] ? kernel_read_file+0x16d/0x190
[  107.916836]  [<ffffffff8122faf4>] ? kernel_read_file_from_fd+0x44/0x70
[  107.916838]  [<ffffffff81169e60>] SYSC_finit_module+0xa0/0xb0
[  107.916839]  [<ffffffff81169e89>] SyS_finit_module+0x9/0x10
[  107.916841]  [<ffffffff81c7d2a0>] entry_SYSCALL_64_fastpath+0x13/0x94
[  107.916842] ---[ end trace 18fd9dffdf110733 ]---
[  107.916843] dvb-usb: could not stop the USB controller CPU.
[  107.916844] dvb-usb: error while transferring firmware (transferred size: -11, block size: 16)
[  107.916844] dvb-usb: firmware download failed at 21 with -22
[  107.916860] usbcore: registered new interface driver dvb_usb_ttusb2
[  133.070641] usb 1-1.2: USB disconnect, device number 12
[  134.778159] usb 1-1.2: new high-speed USB device number 13 using ehci-pci
[  134.856624] usb 1-1.2: New USB device found, idVendor=2304, idProduct=0222
[  134.856626] usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[  134.856811] dvb-usb: found a 'Pinnacle 450e DVB-S USB2.0' in cold state, will try to load a firmware
[  134.856846] dvb-usb: downloading firmware from file 'dvb-usb-pctv-400e-01.fw'
[  134.856847] dvb-usb: could not stop the USB controller CPU.
[  134.856848] dvb-usb: error while transferring firmware (transferred size: -11, block size: 16)
[  134.856849] dvb-usb: firmware download failed at 21 with -22
Comment 3 Alice Ferrazzi Gentoo Infrastructure gentoo-dev 2017-02-14 17:23:35 UTC
looks like your kernel is tainted with proprietary driver and a external loaded module, could you remove it? and post the full dmesg log?

we cannot support proprietary driver
Comment 4 Jiri Pittner 2017-02-14 21:19:34 UTC
It seems that the method of downloading of the firmware blob fails, not the
proprietary firmware itself. If I remove the .fw file, it will just complain that
it was not found. What do you exactly mean by 'removing the driver'?
I fully agree that you cannot support proprietary drivers, but it is not the driver itself what fails, it is its download to the device via USB.
If it worked in previous kernels, it should work in the newer ones.
Comment 5 Alice Ferrazzi Gentoo Infrastructure gentoo-dev 2017-02-15 01:28:37 UTC
can you bisect your kernel ?
Comment 6 Jiri Pittner 2017-02-20 20:08:24 UTC
Had no time recently. I will try whether it persists in 4.10, and if so,
do the bisection.
Comment 7 Alice Ferrazzi Gentoo Infrastructure gentoo-dev 2017-02-21 03:06:32 UTC
ok thanks, please report here how is going, for following up with the ticket.
Comment 8 Jiri Pittner 2017-02-21 13:27:27 UTC
nvidia-drivers-378.13 could not compile with 4.10 kernel:
/scratch/tmp/portage/x11-drivers/nvidia-drivers-378.13/work/kernel/nvidia/nv-pat.c:213:14: error: 'CPU_DOWN_FAILED' undeclared 
(and 3 more similar errors)
so I could not test the videoadapter problem on 4.10
I will try the bisection between 4.7.4 and 4.9.5 in the next days.
Comment 10 Jiri Pittner 2017-03-16 10:52:44 UTC
The problem is still present in 4.10.1 - I have switched to nouveau to avoid
problems with nvidia drivers. Still the DVB-T stick works, DVB-S does not,
with the same error message:

Mar 14 19:09:42 jp kernel: ------------[ cut here ]------------
Mar 14 19:09:42 jp kernel: WARNING: CPU: 2 PID: 5595 at drivers/usb/core/hcd.c:1584 usb_hcd_map_urb_for_dma+0x3a3/0x550
Mar 14 19:09:42 jp kernel: transfer buffer not dma capable
Mar 14 19:09:42 jp kernel: Modules linked in: dvb_usb_ttusb2(+) dvb_usb rc_pinnacle_pctv_hd em28xx_rc rc_core tda18271 cxd2820r em28xx_dvb dvb_core em28xx tveeprom v4l2_common rfcomm vboxnetflt(O) vboxnetadp(O) vboxdrv(O) snd_pcm_oss snd_mixer_oss bnep ax88179_178a uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core videodev media btusb btrtl btbcm btintel bluetooth snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal iwlwifi snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_pcm mei_me mei snd_timer
Mar 14 19:09:42 jp kernel: CPU: 2 PID: 5595 Comm: systemd-udevd Tainted: G           O    4.10.1-gentoo #2
Mar 14 19:09:42 jp kernel: Hardware name: Hewlett-Packard HP ZBook 15 G2/2253, BIOS M70 Ver. 01.08 03/16/2015
Mar 14 19:09:42 jp kernel: Call Trace:
Mar 14 19:09:42 jp kernel:  dump_stack+0x4d/0x65
Mar 14 19:09:42 jp kernel:  __warn+0xcc/0xf0
Mar 14 19:09:42 jp kernel:  warn_slowpath_fmt+0x4a/0x50
Mar 14 19:09:42 jp kernel:  usb_hcd_map_urb_for_dma+0x3a3/0x550
Mar 14 19:09:42 jp kernel:  usb_hcd_submit_urb+0x18c/0x900
Mar 14 19:09:42 jp kernel:  ? touch_atime+0x20/0xa0
Mar 14 19:09:42 jp kernel:  ? generic_file_read_iter+0x5c6/0x7a0
Mar 14 19:09:42 jp kernel:  usb_submit_urb+0x284/0x540
Mar 14 19:09:42 jp kernel:  usb_start_wait_urb+0x5a/0xe0
Mar 14 19:09:42 jp kernel:  usb_control_msg+0xbc/0xf0
Mar 14 19:09:42 jp kernel:  usb_cypress_writemem+0x3d/0x40 [dvb_usb]
Mar 14 19:09:42 jp kernel:  usb_cypress_load_firmware+0x4f/0x140 [dvb_usb]
Mar 14 19:09:42 jp kernel:  ? wake_up_klogd+0x2f/0x40
Mar 14 19:09:42 jp kernel:  ? console_unlock+0x443/0x460
Mar 14 19:09:42 jp kernel:  ? vprintk_emit+0x273/0x410
Mar 14 19:09:42 jp kernel:  ? vprintk_default+0x1a/0x20
Mar 14 19:09:42 jp kernel:  ? printk+0x43/0x4b
Mar 14 19:09:42 jp kernel:  dvb_usb_download_firmware+0x64/0xd0 [dvb_usb]
Mar 14 19:09:42 jp kernel:  dvb_usb_device_init+0x3c7/0x6a0 [dvb_usb]
Mar 14 19:09:42 jp kernel:  ttusb2_probe+0x24/0x80 [dvb_usb_ttusb2]
Mar 14 19:09:42 jp kernel:  usb_probe_interface+0xf8/0x290
Mar 14 19:09:42 jp kernel:  driver_probe_device+0x201/0x2e0
Mar 14 19:09:42 jp kernel:  __driver_attach+0x8e/0x90
Mar 14 19:09:42 jp kernel:  ? driver_probe_device+0x2e0/0x2e0
Mar 14 19:09:42 jp kernel:  bus_for_each_dev+0x5f/0x90
Mar 14 19:09:42 jp kernel:  driver_attach+0x19/0x20
Mar 14 19:09:42 jp kernel:  bus_add_driver+0x1b0/0x230
Mar 14 19:09:42 jp kernel:  driver_register+0x5b/0xe0
Mar 14 19:09:42 jp kernel:  usb_register_driver+0x7d/0x150
Mar 14 19:09:42 jp kernel:  ? 0xffffffffa0434000
Mar 14 19:09:42 jp kernel:  ttusb2_driver_init+0x1e/0x20 [dvb_usb_ttusb2]
Mar 14 19:09:42 jp kernel:  do_one_initcall+0x3f/0x170
Mar 14 19:09:42 jp kernel:  ? __vunmap+0x7c/0xd0
Mar 14 19:09:42 jp kernel:  ? kmem_cache_alloc_trace+0x33/0x140
Mar 14 19:09:42 jp kernel:  do_init_module+0x5b/0x1cb
Mar 14 19:09:42 jp kernel:  load_module+0x1f34/0x2270
Mar 14 19:09:42 jp kernel:  ? __symbol_put+0x30/0x30
Mar 14 19:09:42 jp kernel:  ? kernel_read_file+0x16d/0x190
Mar 14 19:09:42 jp kernel:  ? kernel_read_file_from_fd+0x44/0x70
Mar 14 19:09:42 jp kernel:  SYSC_finit_module+0xa0/0xb0
Mar 14 19:09:42 jp kernel:  SyS_finit_module+0x9/0x10
Mar 14 19:09:42 jp kernel:  entry_SYSCALL_64_fastpath+0x13/0x94
Mar 14 19:09:42 jp kernel: RIP: 0033:0x7f4f860fe2b9
Mar 14 19:09:42 jp kernel: RSP: 002b:00007fff501aed28 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
Mar 14 19:09:42 jp kernel: RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00007f4f860fe2b9
Mar 14 19:09:42 jp kernel: RDX: 0000000000000000 RSI: 00007f4f865e0dbc RDI: 000000000000000d
Mar 14 19:09:42 jp kernel: RBP: 00007fff501aed70 R08: 0000000000000000 R09: 0000000000000000
Mar 14 19:09:42 jp kernel: R10: 000000000000000d R11: 0000000000000246 R12: 00007fff501add30
Mar 14 19:09:42 jp kernel: R13: 00005596fbdf4490 R14: 0000000000000005 R15: 00007fff501add10
Mar 14 19:09:42 jp kernel: ---[ end trace a872fa573253a7c8 ]---


It seems that the core of the problem might be the "transfer buffer is not DMA capable", perhaps consequence of some change in memory management?
When I have some time, I will try to bisect between 4.7.4 (works) and (4.9.5)
to find more precisely when it happened.
Comment 11 Jiri Pittner 2017-10-05 11:51:44 UTC
The problem has been fixed somehow in the meantime, 4.11.7 works well.