From: Luis de Bethencourt <luis@debethencourt.com>
To: "David Cimbůrek" <david.cimburek@gmail.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] media: Pinnacle 73e infrared control stopped working since kernel 3.17
Date: Thu, 12 Feb 2015 11:11:33 +0000 [thread overview]
Message-ID: <20150212111133.GA3580@biggie> (raw)
In-Reply-To: <CAEmZozNL_GZtTVkJvn5sgteSaWoRV2fNNhboADiGJhJNCCh_Fw@mail.gmail.com>
On Thu, Feb 12, 2015 at 08:15:10AM +0100, David Cimbůrek wrote:
> I'll try to describe my thoughts.
>
> The changed structure "dib0700_rc_response" is used in
> dib0700_core.c:dib0700_rc_urb_completion(struct urb *purb) function:
>
> struct dib0700_rc_response *poll_reply;
> ...
> poll_reply = purb->transfer_buffer;
>
> dib0700_rc_urb_completion() is then used in
> dib0700_core.c:dib0700_rc_setup() in macros usb_fill_bulk_urb and
> usb_fill_int_urb. These macros are defined in header file usb.h. Here
> I have found in macro description this:
>
> * @transfer_buffer: pointer to the transfer buffer
>
> I suppose that it means that the struct dib0700_rc_response is being
> filled from this transfer buffer. Therefore I suppose that the order
> of structure members IS important.
>
> Of course it's only my guess but my patch is really working for me :-)
>
Hi David,
I am away from the keyboard most of today. Busy with a training.
I will follow the code you describe as soon as I can in a few hours and report
back.
Thanks,
Luis
>
>
> 2015-02-12 1:10 GMT+01:00 Luis de Bethencourt <luis@debethencourt.com>:
> > On Tue, Feb 10, 2015 at 11:38:11AM +0100, David Cimbůrek wrote:
> >> Please include this patch to kernel! It takes too much time for such a
> >> simple fix!
> >>
> >
> > The patch is simple but why it fixes the issue isn't that simple. Could you
> > explain why the order of the variables inside the structure is breaking things?
> >
> > All the uses of the variables inside the structure that I can see are by name.
> > Not by memory offsets.
> >
> > Thanks,
> > Luis
> >
> >>
> >> 2015-01-07 13:51 GMT+01:00 David Cimbůrek <david.cimburek@gmail.com>:
> >> > No one is interested? I'd like to get this patch to kernel to fix the
> >> > issue. Can someone here do it please?
> >> >
> >> >
> >> > 2014-12-20 14:36 GMT+01:00 David Cimbůrek <david.cimburek@gmail.com>:
> >> >> Hi,
> >> >>
> >> >> with kernel 3.17 remote control for Pinnacle 73e (ID 2304:0237
> >> >> Pinnacle Systems, Inc. PCTV 73e [DiBcom DiB7000PC]) does not work
> >> >> anymore.
> >> >>
> >> >> I checked the changes and found out the problem in commit
> >> >> af3a4a9bbeb00df3e42e77240b4cdac5479812f9.
> >> >>
> >> >> In dib0700_core.c in struct dib0700_rc_response the following union:
> >> >>
> >> >> union {
> >> >> u16 system16;
> >> >> struct {
> >> >> u8 not_system;
> >> >> u8 system;
> >> >> };
> >> >> };
> >> >>
> >> >> has been replaced by simple variables:
> >> >>
> >> >> u8 system;
> >> >> u8 not_system;
> >> >>
> >> >> But these variables are in reverse order! When I switch the order
> >> >> back, the remote works fine again! Here is the patch:
> >> >>
> >> >>
> >> >> --- a/drivers/media/usb/dvb-usr/dib0700_core.c 2014-12-20
> >> >> 14:27:15.000000000 +0100
> >> >> +++ b/drivers/media/usb/dvb-usr/dib0700_core.c 2014-12-20
> >> >> 14:27:36.000000000 +0100
> >> >> @@ -658,8 +658,8 @@
> >> >> struct dib0700_rc_response {
> >> >> u8 report_id;
> >> >> u8 data_state;
> >> >> - u8 system;
> >> >> u8 not_system;
> >> >> + u8 system;
> >> >> u8 data;
> >> >> u8 not_data;
> >> >> };
> >> >>
> >> >>
> >> >> Regards,
> >> >> David
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at http://vger.kernel.org/majordomo-info.html
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-02-12 11:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-10 10:38 [PATCH] media: Pinnacle 73e infrared control stopped working since kernel 3.17 David Cimbůrek
2015-02-10 10:45 ` Antti Palosaari
2015-02-11 13:24 ` David Härdeman
2015-02-11 13:53 ` David Cimbůrek
2015-02-11 14:40 ` David Härdeman
2015-02-11 16:41 ` David Cimbůrek
2015-02-12 11:50 ` Mauro Carvalho Chehab
2015-02-12 17:34 ` David Cimbůrek
2015-02-12 21:57 ` Luis de Bethencourt
2015-02-13 19:58 ` David Cimbůrek
2015-02-24 10:08 ` David Cimbůrek
2015-02-24 10:15 ` David Härdeman
2015-02-24 13:44 ` Mauro Carvalho Chehab
2015-02-24 13:47 ` David Härdeman
2015-02-12 0:10 ` Luis de Bethencourt
2015-02-12 7:15 ` David Cimbůrek
2015-02-12 11:11 ` Luis de Bethencourt [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-12-20 13:36 David Cimbůrek
2015-01-07 12:51 ` David Cimbůrek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150212111133.GA3580@biggie \
--to=luis@debethencourt.com \
--cc=david.cimburek@gmail.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox