lkml.org 
[lkml]   [2015]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6.2 1/1] Input: Add userio module
From
Date
Hi! So, I'm guessing you want me to merge this with the patch I've got
right now and post the new version? (Just making sure since I'm a bit
new to this :)

On Sat, 2015-10-24 at 15:40 -0700, Dmitry Torokhov wrote:
> Hi Stephen,
>
> On Fri, Oct 23, 2015 at 04:47:46PM -0400, cpaul@redhat.com wrote:
> > From: Stephen Chandler Paul <cpaul@redhat.com>
> >
> > Debugging input devices, specifically laptop touchpads, can be
> > tricky
> > without having the physical device handy. Here we try to remedy
> > that
> > with userio. This module allows an application to connect to a
> > character
> > device provided by the kernel, and emulate any serio device. In
> > combination with userspace programs that can record PS/2 devices
> > and
> > replay them through the /dev/userio device, this allows developers
> > to
> > debug driver issues on the PS/2 level with devices simply by
> > requesting
> > a recording from the user experiencing the issue without having to
> > have
> > the physical hardware in front of them.
> >
> > Signed-off-by: Stephen Chandler Paul <cpaul@redhat.com>
> > Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
> > ---
> > Changes
> > * Remove the if (!userio) { return -1; } check that somehow got
> > left in.
> >
> > Sorry this took so long! I was wondering why you hadn't replied
> > yet, only to
> > notice I only made this change on my own tree and never sent out a
> > response
> > patch. Oops.
>
> Thank you for making all the changes.
>
> > +
> > +static ssize_t userio_char_read(struct file *file, char __user
> > *user_buffer,
> > + size_t count, loff_t *ppos)
> > +{
> > + struct userio_device *userio = file->private_data;
> > + int ret;
> > + size_t nonwrap_len, copylen;
> > + unsigned char buf[USERIO_BUFSIZE];
> > + unsigned long flags;
> > +
> > + if (!count)
> > + return 0;
>
> This is not quite right: read of size 0 should still check if there
> is
> data in the buffer and return -EAGAIN for non-blocking descriptors.
>
> I cooked a patch (below) that should adjust the read behavior (_+ a
> coupe of formatting changes), please take a look.
>
> Thanks!
>
--
Cheers,
Lyude



\
 
 \ /
  Last update: 2015-10-26 15:01    [W:0.237 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site