From owner-freebsd-arm@freebsd.org Mon Aug 19 07:21:09 2019 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A181DAB1C0 for ; Mon, 19 Aug 2019 07:21:09 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46Blhf5VCnz4QJF; Mon, 19 Aug 2019 07:21:06 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 200C5260266; Mon, 19 Aug 2019 09:20:58 +0200 (CEST) Subject: Re: Is it a good idea to use a usb-serial adapter for PPS? Yes, it is. To: Ian Lepore , Per Hedeland Cc: freebsd-arm@freebsd.org References: <69a9bed3-4d0a-f8f6-91af-a8f7d84ee307@hedeland.org> <345bae77417c2495f55799b4c7ca2784f4ece9ed.camel@freebsd.org> <7312032d-2908-9414-0445-6b442c3a02e5@hedeland.org> <523b6f0a0fa5f2aeec298fa74df25d3c4af66acc.camel@freebsd.org> <0426fc8b-5398-d8ab-561e-7823c24403a5@hedeland.org> <24b0eaf25b64d6098b390df092866c69e352d859.camel@freebsd.org> <16c91be1-6f2a-b26d-22c7-be8e4ba8eec0@hedeland.org> <72a964c78cbfc36be2345919633ca2196f0783e3.camel@freebsd.org> From: Hans Petter Selasky Message-ID: <540c8b5f-5e81-b67b-4a00-49b86044efe0@selasky.org> Date: Mon, 19 Aug 2019 09:20:17 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46Blhf5VCnz4QJF X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-5.85 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.965,0]; IP_SCORE(-2.58)[ip: (-9.11), ipnet: 2a01:4f8::/29(-1.95), asn: 24940(-1.84), country: DE(-0.01)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; SUBJECT_HAS_QUESTION(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Aug 2019 07:21:09 -0000 On 2019-08-18 23:57, Ian Lepore wrote: > I think HPS reads the arm@ list, but I'll cc him directly on this > reply, just in case he has time to weigh in on this stuff. Hi, I'm subscribed. The behaviour of BULK transfers depend on the actual USB host controller manufacturer. USB transfers are executed by priority, typically: ISOCHRONOUS, INTERRUPT, CONTROL, BULK Depending on the endpoint descriptor, the service rate may vary. The minimum guarantee is to be serviced one time every 125us (for USB2.0). Completion interrupts are usually delayed a bit (63-125us for EHCI/XHCI, 1ms for USB 1.0 via UHCI/OHCI). The USB stack in FreeBSD does not have any memory allocations in the fast path and so is very quick to complete jobs. Also in user-space. Technically speaking, the time device could make predictions about when the packet is read from the USB buffer and when the USB host issues the completion interrupt. These adjustment values could be calibrated by some kind of ping protocol. --HPS