From owner-freebsd-usb@freebsd.org Wed May 1 09:17:14 2019 Return-Path: Delivered-To: freebsd-usb@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CBC5A1586D6B for ; Wed, 1 May 2019 09:17:14 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail06.adl6.internode.on.net (ipmail06.adl6.internode.on.net [150.101.137.145]) by mx1.freebsd.org (Postfix) with ESMTP id 705D76D321 for ; Wed, 1 May 2019 09:17:11 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from unknown (HELO midget.dons.net.au) ([118.211.90.89]) by ipmail06.adl6.internode.on.net with ESMTP; 01 May 2019 18:30:58 +0930 Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.15.2/8.15.2) with ESMTPS id x4190gPY043345 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 1 May 2019 18:30:52 +0930 (ACST) (envelope-from darius@dons.net.au) Received: (from mailnull@localhost) by midget.dons.net.au (8.15.2/8.15.2/Submit) id x418YCQd022032 for ; Wed, 1 May 2019 18:04:12 +0930 (ACST) (envelope-from darius@dons.net.au) X-Authentication-Warning: midget.dons.net.au: mailnull set sender to using -f Received: from [203.31.81.59] ([203.31.81.59]) by [118.211.90.89] (envelope-sender ) (MIMEDefang) with ESMTP id x418Y6jc022031; Wed, 01 May 2019 18:04:12 +0930 From: "O'Connor, Daniel" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Date: Wed, 1 May 2019 18:04:06 +0930 Subject: USB transfers in device drivers Message-Id: <3B922C60-32E5-484E-8AFA-28FF7255CF2C@dons.net.au> To: freebsd-usb@freebsd.org X-Mailer: Apple Mail (2.3445.104.8) X-Spam-Score: 1.3 (*) No, score=1.3 required=5.0 tests=RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Scanned-By: MIMEDefang 2.83 on 10.0.2.1 X-Rspamd-Queue-Id: 705D76D321 X-Spamd-Bar: +++++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [7.59 / 15.00]; MV_CASE(0.50)[]; HAS_XAW(0.00)[]; TO_DN_NONE(0.00)[]; MX_GOOD(-0.01)[cached: midget.dons.net.au]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:4739, ipnet:150.101.0.0/16, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[145.137.101.150.list.dnswl.org : 127.0.5.1]; ARC_NA(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.94)[0.940,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-usb@freebsd.org]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(1.00)[1.000,0]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[dons.net.au]; NEURAL_SPAM_LONG(1.00)[1.000,0]; R_SPF_NA(0.00)[]; GREYLIST(0.00)[pass,body]; IP_SCORE(3.26)[ip: (9.89), ipnet: 150.101.0.0/16(4.32), asn: 4739(2.11), country: AU(-0.01)] X-Spam: Yes X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 May 2019 09:17:15 -0000 Hi, I have a device driver for a USB device (a custom Cypress FX2 based = board) that is relatively simple - it uses the USB FIFO code to create 3 = FIFOs (one bidirectional slow serial interface, one device->PC fast = parallel interface from a hardware FIFO) plus a bunch of ioctls for = getting the FX2 firmware to do various things. We have been having issues on some systems where the hardware FIFO that = the FX2 reads (and sends to the PC) fills up, it has about 50msec (96k) = of buffering (at ~2MByte/sec) which seems like quite a lot to me (given = the driver sets the USB FIFO to buffer 2048 8k chunks..). I don't have a solid hypothesis for the failures as yes but one thing = I'd like to make sure is that the USB stack is keeping the USB hardware = busy with pending requests - does anyone know if the USB FIFO code does = that automatically? I'm currently testing doing 96k transfers (this is the maximum without = some significant reworking) and the FIFO is 16MByte in size but it still = fails so any suggestions welcome.. The FreeBSD version at this site is very old (9.3) so we are going to = update it but it's not easy as the site is quite remote. The hardware in question is a Supermicro X10SLM-F (Intel C224 Express) = with an E3-1220 v3 at 3.1GHz, it also has an LSI MegaRAID SAS 9271-4i = with 4 disks in RAID-5. Unfortunately I do not have ready access to a = similar system here which is annoying.. Any suggestions welcome! PS please CC me on replies. -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum