All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michał Nazarewicz" <m.nazarewicz-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
To: felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org
Cc: "ext Greg KH" <greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>,
	"ext Linus Walleij"
	<linus.ml.walleij-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Linux USB Mailing List"
	<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Krogerus Heikki (EXT-Teleca/Helsinki)"
	<ext-heikki.krogerus-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	"Quadros Roger (Nokia-D/Helsinki)"
	<roger.quadros-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	"Kaliuta Yauheni (Nokia-D/Helsinki)"
	<Yauheni.Kaliuta-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	"Mandy Arnaud.2 (EXT-Teleca/Helsinki)"
	<ext-arnaud.2.mandy-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>,
	"David Brownell"
	<david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>,
	linux-embedded
	<linux-embedded-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Tim Bird" <tim.bird-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org>,
	"libmtp-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org"
	<libmtp-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	"Michał Nazarewicz"
	<mina86-deATy8a+UHjQT0dZR+AlfA@public.gmane.org>
Subject: Re: [RFC/PATCH 0/2] u_char.c and mtp.c patches
Date: Wed, 21 Apr 2010 12:12:48 +0200	[thread overview]
Message-ID: <op.vbibzmh17p4s8u@pikus> (raw)
In-Reply-To: <20100419200457.GB27643-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>

> On Mon, Apr 19, 2010 at 08:57:18PM +0200, ext Michał Nazarewicz wrote:
>> on top of FunctionFS before optimising the code) and in particular u_char
>> seem to be a good piece to steal code from. ;)  Still, as said, I haven't
>> analysed possible optimisations just yet.

On Mon, 19 Apr 2010 22:04:57 +0200, Felipe Balbi <felipe.balbi-xNZwKgViW5g@public.gmane.orgm> wrote:
> go for it :-)

I only started wondering whether buffering won't break some drivers.
Queuing the requests and buffering the data may be good from speed
point of view, but it may lead to user space driver loosing control
over the transmission.

My understanding of USB protocol is not perfect so I may use wrong
terms here, but please bare with me.

fsync() solves the issue of not knowing when the data is sent but
there is no similar mechanism for reading.

In particular how can we stall on read? Say protocol is designed in
such a way, that host sends a request on EP0 and some data on EP1.
Now, after handling the control request from EP0 we would like to
stall no EP1 but by the time we try to do that the data from host
has already been received and buffered in FunctionFS.

-- 
Best regards,                                           _     _
  .o. | Liege of Serenely Enlightened Majesty of       o' \,=./ `o
  ..o | Computer Science,  Michał "mina86" Nazarewicz     (o o)
  ooo +---[mina86-deATy8a+UHjQT0dZR+AlfA@public.gmane.org]---[mina86-/eSpBmjxGS4dnm+yROfE0A@public.gmane.org]---ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-04-21 10:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1268123742-22968-1-git-send-email-felipe.balbi@nokia.com>
     [not found] ` <1268123742-22968-1-git-send-email-felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-04-18 15:24   ` [RFC/PATCH 0/2] u_char.c and mtp.c patches Linus Walleij
     [not found]     ` <x2m63386a3d1004180824u30bea481t3a11ed889c26b293-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-19 16:10       ` Linus Walleij
2010-04-19 16:26         ` Felipe Balbi
     [not found]           ` <20100419162611.GA15131-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-04-19 16:55             ` Michał Nazarewicz
2010-04-19 17:15               ` Greg KH
     [not found]                 ` <20100419171534.GA30381-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2010-04-19 17:24                   ` Felipe Balbi
2010-04-19 18:57                     ` Michał Nazarewicz
2010-04-19 20:04                       ` Felipe Balbi
     [not found]                         ` <20100419200457.GB27643-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-04-21 10:12                           ` Michał Nazarewicz [this message]
2010-04-19 19:23             ` Linus Walleij
2010-04-19 20:07               ` Felipe Balbi
     [not found]                 ` <20100419200727.GC27643-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-04-19 22:44                   ` Greg KH
2010-04-20  6:22                     ` Felipe Balbi
2010-04-20 23:57                       ` Greg KH
     [not found]                     ` <p2ze3bf744d1004230602nd09a7570jb3cee76f87ba8c00@mail.gmail.com>
     [not found]                       ` <p2ze3bf744d1004230602nd09a7570jb3cee76f87ba8c00-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-23 13:04                         ` [Libmtp-discuss] " Felipe Balbi
     [not found]               ` <p2p63386a3d1004191223jb650984ft37372276e4870e87-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-19 21:03                 ` Steve Calfee
2010-04-19 23:10                   ` Linus Walleij
2010-04-20  8:11                     ` Roger Quadros
     [not found]                       ` <4BCD619B.2000907-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-04-20 23:44                         ` Linus Walleij
     [not found]                           ` <i2x63386a3d1004201644g685b8ddeo609c6eaa8c07ed1f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-21  7:07                             ` Roger Quadros
     [not found]                               ` <4BCEA444.20307-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
2010-04-21 20:02                                 ` Linus Walleij
     [not found]                   ` <l2s4a5ff6bc1004191403nfe758331h3b70cdfd40568338-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-04-20  5:21                     ` Felipe Balbi
2010-04-20  7:54               ` Roger Quadros

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=op.vbibzmh17p4s8u@pikus \
    --to=m.nazarewicz-sze3o3uu22jbdgjk7y7tuq@public.gmane.org \
    --cc=Yauheni.Kaliuta-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
    --cc=ext-arnaud.2.mandy-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=ext-heikki.krogerus-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
    --cc=libmtp-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=linus.ml.walleij-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-embedded-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mina86-deATy8a+UHjQT0dZR+AlfA@public.gmane.org \
    --cc=roger.quadros-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
    --cc=tim.bird-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.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 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.