Re: [PATCH] dvb-usb-v2/gl861: fix wrong memcpy

Antti Palosaari
2019-08-21T23:02:41Z

On 8/17/19 4:22 PM, Akihiro TSUKADA wrote:
>> Could you please test the patch and check if the return results are
>> now consistent and that it won't break anything?
>
> I have tested the patch and it worked without problems.
>
> Testd-by: Akihiro Tsukada <tskd08@gmail.com>
>
> I could not noticed the bug because
> the device was registered without any error messages,
> and it seemed to work even with the bug.
> (Though actually I was wrong and missed that
> the device does not work after reboot or re-plugging).
>
> After applying this patch, I have confirmed that the device
> now works after reboot/re-plugging without any problems.
>
> note:
> The patched func: gl861_i2c_read_ex was used in device's early init,
> called from d->props->power_ctrl (from dvb_usbv2_init).
> But dvb_usbv2_init does not check the return value of it,
> and if the device had been initialized previously
> it can work even with the interrupted init process in power_ctrl().

I suspect all whole friio_reset() function is not needed as it has
worked even I/O has been broken.

Also tuner I2C adapter is implemented wrong (I think I mentioned that
earlier). As tuner sits behind demod I2C-adapter/gate that whole logic
should be on demod driver.

regards
Antti

--