From: Mauro Carvalho Chehab <m.chehab@samsung.com>
To: Martin Kittel <linux@martin-kittel.de>
Cc: linux-media@vger.kernel.org
Subject: Re: Patch mceusb: fix invalid urb interval
Date: Tue, 10 Dec 2013 14:20:57 -0200 [thread overview]
Message-ID: <20131210142057.0d6ae3a6@samsung.com> (raw)
In-Reply-To: <loom.20131110T113621-661@post.gmane.org>
Em Sun, 10 Nov 2013 10:50:45 +0000 (UTC)
Martin Kittel <linux@martin-kittel.de> escreveu:
> Hi,
>
> I had trouble getting my MCE remote control to work on my new Intel
> mainboard. It was working fine with older boards but with the new board
> there would be no reply from the remote just after the setup package was
> received during the init phase.
> I traced the problem down to the mceusb_dev_recv function where the received
> urb is resubmitted again. The problem is that my new board is so blazing
> fast that the initial urb was processed in less than a single 125
> microsecond interval, so the urb as it was received had urb->interval set to 0.
> As the urb is just resubmitted as it came in it now had an invalid interval
> set and was rejected.
> The patch just resets urb->interval to its initial value and adds some error
> diagnostics (which would have saved me a lot of time during my analysis).
>
> Any comment is welcome.
>
> Best wishes,
You forgot to send your signed-off-by:
>
> Martin.
>
>
> diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c
> index 3c76101..c5313cb 100644
> --- a/drivers/media/rc/mceusb.c
> +++ b/drivers/media/rc/mceusb.c
> @@ -1030,7 +1030,7 @@ static void mceusb_process_ir_data(struct mceusb_dev *ir
> static void mceusb_dev_recv(struct urb *urb)
> {
> struct mceusb_dev *ir;
> - int buf_len;
> + int buf_len, res;
>
Please use tabs and not spaces. Note: This could be something wrong with your
emailer that could be mangling whitespaces.
> if (!urb)
> return;
> @@ -1067,7 +1067,11 @@ static void mceusb_dev_recv(struct urb *urb)
> break;
> }
>
> - usb_submit_urb(urb, GFP_ATOMIC);
> + urb->interval = ir->usb_ep_out->bInterval; /* reset urb interval */
> + res = usb_submit_urb(urb, GFP_ATOMIC);
> + if (res) {
> + mce_dbg(ir->dev, "restart request FAILED! (res=%d)\n", res);
> + }
No need for braces here. Just do:
+ if (res)
+ mce_dbg(ir->dev, "restart request FAILED! (res=%d)\n", res);
> }
>
> static void mceusb_get_emulator_version(struct mceusb_dev *ir)
>
>
> --
> 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
--
Cheers,
Mauro
next prev parent reply other threads:[~2013-12-10 16:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-10 10:50 Patch mceusb: fix invalid urb interval Martin Kittel
2013-12-10 16:20 ` Mauro Carvalho Chehab [this message]
2013-12-11 13:17 ` Sean Young
2013-12-11 20:34 ` Martin Kittel
2014-01-15 15:49 ` Mauro Carvalho Chehab
2014-01-15 16:52 ` Sean Young
2014-01-15 17:59 ` Mauro Carvalho Chehab
2014-01-19 21:05 ` Martin Kittel
2014-01-19 21:56 ` Sean Young
2014-01-20 17:36 ` Jarod Wilson
2014-11-03 16:49 ` Mauro Carvalho Chehab
2014-11-04 21:25 ` Sean Young
2014-11-04 22:39 ` Mauro Carvalho Chehab
2014-01-16 2:55 ` Jarod Wilson
2014-01-20 21:29 ` Sean Young
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=20131210142057.0d6ae3a6@samsung.com \
--to=m.chehab@samsung.com \
--cc=linux-media@vger.kernel.org \
--cc=linux@martin-kittel.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.