public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Felipe Balbi <balbi@ti.com>
Cc: "Robert Baldyga" <r.baldyga@samsung.com>,
	"Michał Nazarewicz" <mina86@mina86.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Krzysztof Opasiak" <k.opasiak@samsung.com>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: gadget: ffs: add eventfd notification about ffs events
Date: Tue, 27 Jan 2015 09:26:34 -0600	[thread overview]
Message-ID: <20150127152634.GA14623@saruman.tx.rr.com> (raw)
In-Reply-To: <20150127152530.GD13776@saruman.tx.rr.com>

[-- Attachment #1: Type: text/plain, Size: 2159 bytes --]

On Tue, Jan 27, 2015 at 09:25:30AM -0600, Felipe Balbi wrote:
> On Fri, Jan 23, 2015 at 01:34:45PM +0100, Robert Baldyga wrote:
> > On 01/23/2015 01:21 PM, Michał Nazarewicz wrote:
> > > 23 sty 2015 10:28 "Robert Baldyga" <r.baldyga@samsung.com
> > > <mailto:r.baldyga@samsung.com>> napisał(a):
> > >> Add eventfd which notifies userspace about ep0 events and AIO completion
> > >> events. It simplifies using of FunctionFS with event loop, because now
> > >> we need to poll on single file (instead of polling on ep0 and eventfd's
> > >> supplied to AIO layer).
> > >>
> > >> FunctionFS eventfd is not triggered if another eventfd is supplied to
> > >> AIO layer (in AIO request). It can be useful, for example, when we want
> > >> to handle AIO transations for chosen endpoint in separate thread.
> > >>
> > >> Signed-off-by: Robert Baldyga
> > > 
> > > I don't know much about eventfd interface bit from ffs point of view:
> > > 
> > > Acked-by: Michal Nazarewicz <mina86@mina86.com <mailto:mina86@mina86.com>>
> > > 
> > >> @@ -2180,6 +2191,20 @@ static int __ffs_data_got_descs(struct ffs_data
> > > *ffs,
> > >>                 goto error;
> > >>         }
> > >>
> > >> +       if (flags & FUNCTIONFS_EVENTFD) {
> > >> +               if (len < 4)
> > >> +                       goto error;
> > >> +               ffs->ffs_eventfd =
> > >> +                       eventfd_ctx_fdget((int)get_unaligned_le32(data));
> > >> +               if (IS_ERR(ffs->ffs_eventfd)) {
> > >> +                       ffs->ffs_eventfd = NULL;
> > >> +                       ret = PTR_ERR(ffs->ffs_eventfd);
> > > 
> > > Need to swap those lines.
> > > 
> > >> +                       goto error;
> > >> +               }
> > >> +               data += 4;
> > >> +               len  -= 4;
> > >> +       }
> > >> +
> > >>         /* Read fs_count, hs_count and ss_count (if present) */
> > >>         for (i = 0; i < 3; ++i) {
> > >>                 if (!(flags & (1 << i))) {
> > > 
> > 
> > Good catch, thanks!
> 
> Are you sending a new version, or should I fix this myself?

nevermind, found v2 :)

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2015-01-27 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23  9:28 [PATCH] usb: gadget: ffs: add eventfd notification about ffs events Robert Baldyga
     [not found] ` <CA+pa1O0nZJ6G1NpPF+qHvchnfSuCvi-f0KMROkOkVq6pNkMX3Q@mail.gmail.com>
2015-01-23 12:34   ` Robert Baldyga
2015-01-27 15:25     ` Felipe Balbi
2015-01-27 15:26       ` Felipe Balbi [this message]

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=20150127152634.GA14623@saruman.tx.rr.com \
    --to=balbi@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=k.opasiak@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mina86@mina86.com \
    --cc=r.baldyga@samsung.com \
    /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