Re: [REVIEW PATCH 1/2] img-ir/hw: Avoid clearing filter for no-op protocol change

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

 



Hi Mauro,

On 04/12/14 17:38, Mauro Carvalho Chehab wrote:
> Em Mon, 1 Dec 2014 12:55:09 +0000
> James Hogan <james.hogan@xxxxxxxxxx> escreveu:
> 
>> When the img-ir driver is asked to change protocol, if the chosen
>> decoder is already loaded then don't call img_ir_set_decoder(), so as
>> not to clear the current filter.
>>
>> This is important because store_protocol() does not refresh the scancode
>> filter with the new protocol if the set of enabled protocols hasn't
>> actually changed, but it will still call the change_protocol() callback,
>> resulting in the filter being disabled in the hardware.
>>
>> The problem can be reproduced by setting a filter, and then setting the
>> protocol to the same protocol that is already set:
>> $ echo nec > protocols
>> $ echo 0xffff > filter_mask
>> $ echo nec > protocols
>>
>> After this, messages which don't match the filter still get received.
> 
> This should be fixed at the RC core, as this is not driver-specific.

Yes, you're right. I've fixed there and attempted backporting, and the
problem appears to have actually been introduced in commit da6e162d6a46
("[media] rc-core: simplify sysfs code") which went into v3.17.

I'll send a v2.

Thanks
James

> 
> Regards,
> Mauro

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]