From owner-freebsd-bugs@freebsd.org Thu Mar 19 13:46:34 2020 Return-Path: Delivered-To: freebsd-bugs@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 1C0D5260C08 for ; Thu, 19 Mar 2020 13:46:34 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48jp945YnLz4Y4R for ; Thu, 19 Mar 2020 13:46:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 66C64260C07; Thu, 19 Mar 2020 13:46:32 +0000 (UTC) Delivered-To: bugs@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 656DE260C05 for ; Thu, 19 Mar 2020 13:46:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48jp921mTGz4Y34 for ; Thu, 19 Mar 2020 13:46:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 09BF6BD90 for ; Thu, 19 Mar 2020 13:46:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 02JDkTWJ026008 for ; Thu, 19 Mar 2020 13:46:29 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 02JDkTNc026007 for bugs@FreeBSD.org; Thu, 19 Mar 2020 13:46:29 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 204521] [new driver] [request] Port rtsx from OpenBSD to FreeBSD Date: Thu, 19 Mar 2020 13:46:26 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: feature, patch X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: gljennjohn@gmail.com X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2020 13:46:34 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D204521 --- Comment #41 from Gary Jennejohn --- (In reply to dirkx from comment #40) The code is correct. The {Net,Open}BSD upper layer code always sets xfer_l= en to the correct value. FreeBSD does indeed have xfer_len, but the upper lay= er never sets it. To simplify implementing the OpenBSD code (and avoid kernel panics) it was convenient for hlh to set xfer_len to a reasonable value. I must admit that what's on github looks nothing like the code I've tested.= =20 I've made massive changes to DMA code, added lots of variations on how transfers are done based on examining what OpneBSD and Linux do in various situations and added large amounts of debugging. Unfortunately, nothing I'= ve tried so far results in successful DMA transfers. One test I did was to set a byte pattern in the virtual address of the DMA buffer, start the transfer (the controller claims that no errors occurred),= and then dump the physical address of the buffer using /dev/mem. The result was that NO bytes were transferred at all, i.e. the contents of the virtual and physical addresses were identical. There is much more to the {Net,Open}BSD implementation than just the driver= .=20 There is an upper layer which implements the SD Card Host Controller Specification. It is somewhat different than what was implemented in FreeB= SD.=20 I'm beginning to suspect that these differences may be contributing to the = DMA problems. --=20 You are receiving this mail because: You are the assignee for the bug.=