From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans Petter Selasky Subject: Re: [PATCH/RFC 5/5] usb: Add support for streams alloc/dealloc to devio.c Date: Wed, 17 Aug 2011 09:06:03 +0200 Message-ID: <201108170906.03901.hselasky@c2i.net> References: <1308231068-24038-2-git-send-email-tlinder@codeaurora.org> <8bcfda19cbc633e011e6b28a6183e68b.squirrel@www.codeaurora.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Amit Blay Cc: Sarah Sharp , Tatyana Brokhman , greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, balbi-l0cyMroinI0@public.gmane.org, Amit Blay , open list List-Id: linux-arm-msm@vger.kernel.org On Wednesday 27 July 2011 08:21:35 Amit Blay wrote: > Hi Sarah, > > A gentle reminder, can you please take a look at the proposed solution > below for stream alloc/dealloc in devio.c? I responded to your comments > about the original patch. Hi, I'm looking into implementing USB 3.0 streams support for FreeBSD and would like to have a solution in Linux which is not too far apart, also regarding API's for userspace. I would suggest overloading the "unsigned int pipe", instead of breaking existing API's by adding a new stream ID value. Also for LibUSB. ./linux/usb.h: unsigned int pipe; /* (in) pipe information */ As per definition there are 15 bits available for "pipe". I think it is not important to support more than 255 streams in the first go, hence I see no real applications that would benefit from that many streams yet. #define usb_pipeendpoint(pipe) (((pipe) >> 15) & 0xf) Then I suggest a new function/IOCTL in libusb which can be used to switch on/off streams on a given endpoint. This is something which would need to be done before submitting any URB's on that endpoint. And would be similar to the clear-stall case. If an URB is submitted on a stream when streams are disabled then it should just fail and vice versa. --HPS -- 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