From owner-freebsd-drivers@freebsd.org Wed May 15 23:10:46 2019 Return-Path: Delivered-To: freebsd-drivers@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 1055215A49E5 for ; Wed, 15 May 2019 23:10:46 +0000 (UTC) (envelope-from rj@obsigna.com) Received: from projectstore.net (ec2-18-228-164-192.sa-east-1.compute.amazonaws.com [18.228.164.192]) (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 B60FD75249 for ; Wed, 15 May 2019 23:10:42 +0000 (UTC) (envelope-from rj@obsigna.com) Received: from mail.obsigna.com (unknown [179.212.183.9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by projectstore.net (Postfix) with ESMTPSA id 565421E0FCD for ; Wed, 15 May 2019 20:10:30 -0300 (-03) Received: from rolf-mini.obsigna.com (rolf-mini.obsigna.com [192.168.222.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.obsigna.com (Postfix) with ESMTPSA id 5218C1350F93F for ; Wed, 15 May 2019 19:59:03 -0300 (-03) From: "Dr. Rolf Jansen" Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: DMA problems Message-Id: <342E86DE-F702-4ACA-8BF4-5BD25C1F62EA@obsigna.com> Date: Wed, 15 May 2019 20:11:13 -0300 To: freebsd-drivers@freebsd.org X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: B60FD75249 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of rj@obsigna.com designates 18.228.164.192 as permitted sender) smtp.mailfrom=rj@obsigna.com X-Spamd-Result: default: False [-1.47 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.977,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:projectstore.net]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-drivers@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-0.99)[-0.992,0]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[obsigna.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MX_GOOD(-0.01)[obsigna.com,mail.obsigna.com]; NEURAL_HAM_SHORT(-0.42)[-0.420,0]; FROM_NAME_HAS_TITLE(1.00)[dr]; IP_SCORE(-0.27)[asn: 16509(-1.31), country: US(-0.06)]; RECEIVED_SPAMHAUS_PBL(0.00)[9.183.212.179.zen.spamhaus.org : 127.0.0.11]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16509, ipnet:18.228.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 May 2019 23:10:46 -0000 I am in the process of deploying to a computer of a customer a software = for measurement of electrical signals by the way of a data acquisition = board from National Instruments NI PCIe-6351. My development machine and the computer of the customer are running the = latest FreeBSD 12.0-RELEASE-p4. Other software installations and = settings are nearly identical. The development system consist of an ASrock B250M Pro4 motherboard, = equipped with a Core i7-7700K @ 4.2 GHz + 16 GB of RAM. The deployment machine is a Dell OptiPlex 7060 Minitower XCTO, which = employs a Core i5-8500 CPU @ 3.00GHz + 8 GB of RAM. On the dev machine, my software is running perfectly and by utilizing = DMA I can drive the ADC scan rate up to 1 Msamples/s and the DAC update = rate up to 2.8 Msamples/s. On the deployment computer, DMA seems to be = non-functional. While slow, on demand ADC sampling and DAC updating does = work like all other functions of said DAQ board seem to work OK. = However, once DMA is involved, the customer=E2=80=99s system hangs, = waiting for the DMA channels filling with measurement data which = doesn=E2=80=99t seem to happen. I am a little bit lost now. May it be that the DMA controller of the Dell OptiPlex is somehow = incompatible with FreeBSD and/or the NI DAQ board? How may I debug this issue? The DMA memory is allocated by a kernel module and the virtual and = physical addresses are informed to the user land measurement software = which in turn adjusts the NI-DAQ board respectively. Once, again, on the ASRock i7 system DMA works perfectly, on the = OptiPlex i5 DMA hangs. I got older systems having old NI PCI-6251 boards = installed on Intel D510M motherboards wit Dual Core Atom @1.6 GHz + 2 = GB of RAM. On these systems, DMA is working as well in quite a similar = way. What=E2=80=99s the problem with DMA and Dell? Any insights would be highly appreciated. Best regards Rolf=