linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manuel Reimer <mail+linux-input@m-reimer.de>
To: linux-input <linux-input@vger.kernel.org>
Subject: Re: uinput: ioctls for UI_BEGIN_FF_UPLOAD fails (returns -1). How to debug?
Date: Thu, 31 Mar 2016 19:46:50 +0200	[thread overview]
Message-ID: <56FD628A.6040606@m-reimer.de> (raw)
In-Reply-To: <56FAB1D3.5020003@m-reimer.de>

On 03/29/2016 06:48 PM, Manuel Reimer wrote:
> As the idea was to publish this under GPL3 anyway, I've uploaded my
> early development state:
>
> https://github.com/M-Reimer/pspaddrv

I'm still getting the errors and I'm still not finding any reason for them.

I had a look at the kernel code and there are mutex locks, so at least 
it seems like it should be thread-safe.

So what I don't understand is, if there are any limitations with the 
function "mutex_lock_interruptible" used by the kernel.

As I have a big list of "write" in here:
https://github.com/M-Reimer/pspaddrv/blob/master/uinput.c#L170
And this block is called at maximum speed the USB attached controller 
can deliver. I guess there is a really good chance that this function is 
hit between "EV_UINPUT" is received and my UI_BEGIN_FF_UPLOAD ioctl is 
sent. Will this conflict in some way?

Of course, it is possible to prefilter the events, I plan to send to 
uinput. I can keep a copy of the last sent event block and compare each 
event to the old state before actually sending it. Is there any chance 
that this could help in this case?

Thanks in advance

Manuel

  reply	other threads:[~2016-03-31 17:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-27 18:53 uinput: ioctls for UI_BEGIN_FF_UPLOAD fails (returns -1). How to debug? Manuel Reimer
2016-03-27 19:11 ` Clément VUCHENER
2016-03-28  8:53   ` Manuel Reimer
2016-03-29 10:21     ` Clément VUCHENER
2016-03-29 16:48       ` Manuel Reimer
2016-03-31 17:46         ` Manuel Reimer [this message]
2016-04-03 10:02           ` Manuel Reimer
2016-04-03 10:21             ` Clément VUCHENER
2016-04-05 19:10               ` Manuel Reimer

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=56FD628A.6040606@m-reimer.de \
    --to=mail+linux-input@m-reimer.de \
    --cc=linux-input@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;
as well as URLs for NNTP newsgroup(s).