Welcome! Log In Create A New Profile

Advanced

[Kernel 4.6] afatech based DVB-T usb sticks doesn't work anymore but not all

Posted by pengu 
[Kernel 4.6] afatech based DVB-T usb sticks doesn't work anymore but not all
May 23, 2016 11:07AM
- Hauppauge WinTV MiniStick 2 (NSA325, iConnect, x86_64) (prod: f900 ven: 2040)
- MSI Digi Vox Mini II (black / white) (NSA325, iConnect) (prod: 9016 ven: 15a4)

as mentioned in the linux kernel thread, this sticks cannot be used in kernel 4.6 as they were
fully functional in linux 4.5.5 and earlier.

after searching a bit around, I found out, that there were some changes between kernel 4.6 rc2
and 4.6 rc3

https://lkml.org/lkml/2016/5/19/237


behaviour in kernel 4.5 and earlier:

[   12.603699] usb 1-1.2: dvb_usb_af9035: prechip_version=83 chip_version=02 chip_type=9135
[   12.662092] usb 1-1.2: dvb_usb_v2: found a 'Hauppauge WinTV-MiniStick 2' in cold state
[   12.773961] usb 1-1.2: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9135-02.fw'
[   12.948436] usb 1-1.2: dvb_usb_af9035: firmware version=3.40.1.0
[   12.976153] usb 1-1.2: dvb_usb_v2: found a 'Hauppauge WinTV-MiniStick 2' in warm state
[   12.994935] usb 1-1.2: dvb_usb_af9035: [0] overriding tuner from 00 to 60
[   13.031671] usb 1-1.2: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
[   13.076727] DVB: registering new adapter (Hauppauge WinTV-MiniStick 2)
[   13.145692] af9033 1-0038: firmware version: LINK 3.40.1.0 - OFDM 3.40.1.0
[   13.167965] af9033 1-0038: Afatech AF9033 successfully attached
[   13.182569] usb 1-1.2: DVB: registering adapter 0 frontend 0 (Afatech AF9033 (DVB-T))...
[   13.257792] it913x 1-001c: ITE IT913X BX successfully attached
[   13.303056] Registered IR keymap rc-empty
[   13.316012] input: Hauppauge WinTV-MiniStick 2 as /devices/platform/ocp@f1000000/f1050000.ehci/usb1/1-1/1-1.2/rc/rc0/input1
[   13.339333] rc rc0: Hauppauge WinTV-MiniStick 2 as /devices/platform/ocp@f1000000/f1050000.ehci/usb1/1-1/1-1.2/rc/rc0
[   13.358682] usb 1-1.2: dvb_usb_v2: schedule remote query interval to 500 msecs
[   13.366107] usb 1-1.2: dvb_usb_v2: 'Hauppauge WinTV-MiniStick 2' successfully initialized and connected
[   13.378399] usbcore: registered new interface driver dvb_usb_af9035

behavour in kernel 4.6:


[ 1058.488465] usb 1-1.3: new high-speed USB device number 5 using orion-ehci
[ 1058.613242] usb 1-1.3: New USB device found, idVendor=2040, idProduct=f900
[ 1058.624403] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1058.644422] usb 1-1.3: Product: WinTV-Ministick 2
[ 1058.652416] usb 1-1.3: Manufacturer: Hauppauge
[ 1058.664407] usb 1-1.3: SerialNumber: 000DFE8C7D80
[ 1058.681675] usb 1-1.3: dvb_usb_af9035: prechip_version=83 chip_version=02 chip_type=9135
[ 1058.701376] usb 1-1.3: dvb_usb_v2: found a 'Hauppauge WinTV-MiniStick 2' in cold state
[ 1058.716178] usb 1-1.3: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9135-02.fw'
[ 1058.790534] dvb_usb_af9035: probe of 1-1.3:1.0 failed with error -5

the erratic source is in the pinctrl stuff:

linux/drivers/base/pinctrl.c

	dev->pins->p = devm_pinctrl_get(dev);
	if (IS_ERR(dev->pins->p)) {
		dev_dbg(dev, "no pinctrl handle\n");
		ret = PTR_ERR(dev->pins->p);
		goto cleanup_alloc;
	}


linux/drivers/pinctrl/core.c http://pastebin.com/Fm0YHTrS

I've testet some other sticks, but they weren't affected:

- MSI Digi Vox Mini Deluxe (realtek) (prod: 1101 ven: 1d19)
- Terratec Cinergy T Stick + (realtek) (prod: 2832 ven: 0bda)
- Terratec Cinergy T Stick (afatech but uses dvb-usb-af9035-02 firmware) (prod: 0093 ven: 0ccd)
- Hauppauge Nova-T 2 (Dibcom) (prod: 7060 ven: 2040)

Other things not effected (tested with some of my devices):

- Wlan Sticks (Realtek, Ralink, Atheros)
- Mass Storage
- UMTS Sticks (Huawei)



Edited 11 time(s). Last edit at 05/23/2016 03:23PM by pengu.
Re: [Kernel 4.6] afatech based DVB-T usb sticks doesn't work anymore but not all
May 23, 2016 12:45PM
This did not look like pinctrl problem. It looks like the firmware was not loaded in your installation. Which kernel are you using?
uname -a

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [Kernel 4.6] afatech based DVB-T usb sticks doesn't work anymore but not all
May 23, 2016 01:53PM
I'm using kernel 4.6.0 on all mentioned devices (kirkwood and x86_64) devices and no matter which firmware I use, the error stays the same.
The DVB stuff isn't affected because the situation doesn't change when bulding and using drivers from media_build git


the problem appears when probing and only a some but not all afatech based sticks were affected.


	/*
	 * Ensure devices are listed in devices_kset in correct order
	 * It's important to move Dev to the end of devices_kset before
	 * calling .probe, because it could be recursive and parent Dev
	 * should always go first
	 */
	devices_kset_move_last(dev);

	if (dev->bus->probe) {
		ret = dev->bus->probe(dev);
		if (ret)
			goto probe_failed;
	} else if (drv->probe) {
		ret = drv->probe(dev);
		if (ret)
			goto probe_failed;
	}

-> linux/drivers/base/dd.c


Note:

The Terratec Cinergy T (af9035 / af9033 / TUA9001 ) is working, while the WinTV MiniStick v2 ( af9035 / af9033 / IT9135 (tuner + dmod)) does not (kernel 4.6.0)



Edited 10 time(s). Last edit at 06/05/2016 06:31AM by pengu.
Re: [Kernel 4.6] afatech based DVB-T usb sticks doesn't work anymore but not all
May 28, 2016 07:51PM
Looks like you're missing the fw blob in the new kernel. Try reinstall the device, or find where the file is and copy it over.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [Kernel 4.6] afatech based DVB-T usb sticks doesn't work anymore but not all
May 29, 2016 06:36AM
sorry if I didn't mentioned .. the firmware is still in /lib/firmware and it's running fine now with kernel 4.5.5.
Re: [Kernel 4.6] afatech based DVB-T usb sticks doesn't work anymore but not all
June 04, 2016 04:57AM
The problem persists in linux-4.7-rc1 ..

[    0.000000] Linux version 4.7.0-rc1-kirkwood-rm-2 (root@debianNSA325v2) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sat Jun 4 03:50:52 CEST 2016
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine model: Iomega Iconnect
...
...
[   13.188530] usb 1-1.2: dvb_usb_af9035: prechip_version=83 chip_version=02 chip_type=9135
[   13.242168] usb 1-1.2: dvb_usb_v2: found a 'Hauppauge WinTV-MiniStick 2' in cold state
[   13.325770] usb 1-1.2: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9135-02.fw'
[   13.428607] rt2800pci 0000:01:00.0: enabling device (0140 -> 0142)
[   13.438180] dvb_usb_af9035: probe of 1-1.2:1.0 failed with error -5
[   13.438338] usbcore: registered new interface driver dvb_usb_af9035
...
Re: [Kernel 4.6] afatech based DVB-T usb sticks doesn't work anymore but not all
June 04, 2016 06:05AM
I still think you should double check the fw file in /lib/firmware. Somtime it is in /lib/firmware/4.6/xxx and sometime it is in /lib/firmware/xxx. Looks like it failed during loading fw.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [Kernel 4.6] afatech based DVB-T usb sticks doesn't work anymore but not all
June 04, 2016 09:57AM
the firmware (dvb-usb-it9135-02.fw) is in /lib/firmware and it gets loaded when running linux-4.5.6 and earlier and doesn't load when running linux-4.6.0 and later.
The firmware files can be found here and the recommanded file which works when running Linux-4.5.6 and earlier can be found here.

Same thing when using MSI DigiVox Mini II (dvb-usb-af9015.fw) (arm only)
The recommanded and working firmware (can be found here
As described earlier, this is a side effect caused by changes made between linux-4.6-rc2 and linux-4.6-rc3.
It's not a firmware problem, because all available firmware files doesn't load when running linux-4.6.0 and later.
Re: [Kernel 4.6] afatech based DVB-T usb sticks doesn't work anymore but not all
June 04, 2016 04:11PM
pengu

Well, if you look at the code, looks like the firmware loading has not been completed. And that does not have anything to do with pintctrl.

[   12.662092] usb 1-1.2: dvb_usb_v2: found a 'Hauppauge WinTV-MiniStick 2' in cold state
[   12.773961] usb 1-1.2: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9135-02.fw'
[   12.948436] usb 1-1.2: dvb_usb_af9035: firmware version=3.40.1.0

This fw version is printed out during the probe which call fw loading. The probe was successful until it loads fw, but the fw loading was not successful.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: [Kernel 4.6] afatech based DVB-T usb sticks doesn't work anymore but not all
June 05, 2016 06:31AM
bodhi Wrote:
-------------------------------------------------------
> pengu
>
> Well, if you look at the code, looks like the
> firmware loading has not been completed. And that
> does not have anything to do with pintctrl.
>
>
> [   12.662092] usb 1-1.2: dvb_usb_v2: found a
> 'Hauppauge WinTV-MiniStick 2' in cold state
> [   12.773961] usb 1-1.2: dvb_usb_v2: downloading
> firmware from file 'dvb-usb-it9135-02.fw'
> [   12.948436] usb 1-1.2: dvb_usb_af9035:
> firmware version=3.40.1.0
>
>
> This fw version is printed out during the probe
> which call fw loading. The probe was successful
> until it loads fw, but the fw loading was not
> successful.


not directly but probing of USB devices is effected by that change.
Before the change, the firmware is loading fine, after the change, the firmware (for Hauppauge MiniStick 2 any firmware) doesn't load anymore.
This is because the mentioned function has always different output than before (-5 not 0) but nothing changed (hardware)
and it doesn't matter which "driver" was loaded .. the in-kernel or the one from media_build.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: