From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?TWljaGHFgiBOYXphcmV3aWN6?= Subject: Re: [RFC/PATCH 0/2] u_char.c and mtp.c patches Date: Wed, 21 Apr 2010 12:12:48 +0200 Message-ID: References: <1268123742-22968-1-git-send-email-felipe.balbi@nokia.com> <20100419162611.GA15131@nokia.com> <20100419171534.GA30381@kroah.com> <20100419172404.GA15340@nokia.com> <20100419200457.GB27643@nokia.com> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-reply-to: <20100419200457.GB27643-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="utf-8"; format="flowed delsp=yes" To: felipe.balbi-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org Cc: ext Greg KH , ext Linus Walleij , Linux USB Mailing List , "Krogerus Heikki (EXT-Teleca/Helsinki)" , "Quadros Roger (Nokia-D/Helsinki)" , "Kaliuta Yauheni (Nokia-D/Helsinki)" , "Mandy Arnaud.2 (EXT-Teleca/Helsinki)" , David Brownell , linux-embedded , Tim Bird , "libmtp-discuss-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org" , =?utf-8?B?TWljaGHFgiBOYXphcmV3aWN6?= > On Mon, Apr 19, 2010 at 08:57:18PM +0200, ext Micha=C5=82 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 ha= ven't >> analysed possible optimisations just yet. On Mon, 19 Apr 2010 22:04:57 +0200, Felipe Balbi 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. --=20 Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=3D./ `o ..o | Computer Science, Micha=C5=82 "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