From owner-svn-src-all@freebsd.org Tue Apr 19 20:41:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 675EBB154AF; Tue, 19 Apr 2016 20:41:23 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-yw0-x22b.google.com (mail-yw0-x22b.google.com [IPv6:2607:f8b0:4002:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 21A7F14C6; Tue, 19 Apr 2016 20:41:23 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: by mail-yw0-x22b.google.com with SMTP id t10so31664118ywa.0; Tue, 19 Apr 2016 13:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=lQlHWRzRQCZIw3HoIhUlcEYEyhCr1F9Q7n+dl+ymljs=; b=NbjnRJ9a5CKc0e7HBE72wAdKhcb0MbhyhXaUZ0jsXxmoC3k5SZ3nPAoip4UWqUtwTI KW0t1I+p1DfWL0dF8kTregHrJ07I4csioCqc97CgCjlr7vkS1Hu8naQOPjAflE41V6Tq lDDaGQ3un6r/DJOehFiErkwDRa1PdEl5e82zMX3sc+BHaoTkUVSwxY7sF4edtvhqXCtG u1+pX5l8dIUuSF/hYN60Uh7rCHgyws0ferQ6Qck5Janhfw020025gZOoBzoX45X31UD5 lqBLKsLab/JBNm+ag8CD2vmPVAk8XmKj18LB3qUOWIiItW1U66qTSOkROQVqPcEg4dPp fYGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=lQlHWRzRQCZIw3HoIhUlcEYEyhCr1F9Q7n+dl+ymljs=; b=QfX+uh013zWC07VMXZGwVwxqCML2n97DitlAG56XFUJWmIa1GixFaD3N+0kH0eLi4D /MW/U+1RghS5rRvx2tANYy/3yIyrCoPjbxCb4FWBzw9PXxeqc7wZ8/pPleOBXbdVu5+c OoH1a1hIqkstzCYHJ+0Eq5bBQgUjBvTvcIrg+OKGufuPLuu1r2LeZt/j+nZzQSTOz5ZL rHRo0apWlA/rt5CPDvZny/fcdLDnbeab8JyTeDSKGbBhLlJ/j+0wnhLuZjovsLYsiQmj TjGucRoMon/IRiGR+0l8KdcR0guWFEhumVpVj3qBF2YSnqNQ3X8Vgdafup0eJ/ms71sb Q+Lg== X-Gm-Message-State: AOPr4FVTWE+89e3S5sDjPc6W5XCnbH3vdN/BZGfIBIbxv4N0/K3//1P7gsgmtXx4+cu2sNBDBEGD3O5IHJjJZg== MIME-Version: 1.0 X-Received: by 10.37.209.215 with SMTP id i206mr2926006ybg.127.1461098482263; Tue, 19 Apr 2016 13:41:22 -0700 (PDT) Sender: pkelsey@gmail.com Received: by 10.129.27.14 with HTTP; Tue, 19 Apr 2016 13:41:22 -0700 (PDT) In-Reply-To: References: <201604191539.u3JFdkHx048678@repo.freebsd.org> <20160419171243.GA30453@bsdpad.com> <1461097280.1232.34.camel@freebsd.org> Date: Tue, 19 Apr 2016 16:41:22 -0400 X-Google-Sender-Auth: BKZDzLVUoNrAOXSLyxMRQAV0hUY Message-ID: Subject: Re: svn commit: r298274 - head/sys/dev/spibus From: Patrick Kelsey To: Adrian Chadd Cc: Ian Lepore , Juli Mallett , Ruslan Bukin , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2016 20:41:23 -0000 On Tue, Apr 19, 2016 at 4:38 PM, Adrian Chadd wrote: > On 19 April 2016 at 13:37, Patrick Kelsey wrote: > > > > > > On Tue, Apr 19, 2016 at 4:21 PM, Ian Lepore wrote: > >> > >> On Tue, 2016-04-19 at 13:17 -0700, Juli Mallett wrote: > >> > Patrick Kelsey offered an mmcspi driver for FreeBSD, but nobody > >> > seemed > >> > interested. I know of one proprietary branch of FreeBSD using it. > >> > You might poke him if you want to know how he dealt with this, and if > >> > you want to commit his driver. > >> > > >> > >> Patrick is a committer, maybe he should just commit it. :) > > > > > > What I believe originally held up that driver being committed (by others > - > > this was before my commit bit) was that I relied on some out-of-tree > spibus > > changes Luiz had made (as I recall, mainly being able to reserve the SPI > bus > > for multiple transactions), and getting those into the tree would have > > required updating/testing other existing SPI drivers, based on feedback I > > received at the time. All I had was the RB450G that I developed and > tested > > the driver with, so I really couldn't address that issue, and then work > took > > me in some other direction entirely. Some or all of these spibus changes > > that I relied on might now be in the tree, I'm not sure offhand. I am > sure > > though that a huge stack of other things I need to get through has > > chronically kept me from updating that driver to current and retesting. > > > > When I wrote that driver, I put a lot of effort into testing it against > as > > many different cards as I could obtain at the time - I believe 30 or so > in > > total, all the details are in the code that was posted to the list back > > then. I encountered a number of strange/unexpected behaviors in that > set of > > cards, and all of that hard-won knowledge is in that driver, including a > > much less complex fix for a shifted-response-data issue than you will > see if > > you look at the Linux mmcpsi driver (as I recall, the Linux driver has > code > > to arbitrarily bit-shift card response data, and to detect when that > should > > be done, but it turns out that can be avoided entirely by inserting idle > > cycles in the right place when sending the command). > > Well, we should add the SPI bus reservation code and churn stuff as > needed. I think that'd be a great addition. > > Do you have a patchset somewhere? > > Just going from memory here - there is what I posted to the list, then at some point Luiz took a stab at updating it to then-current (I should have a copy of those somewhere - not sure where else they went, if anywhere), and beyond that, I think there's a harmless but unnecessary conditional in the original code that could be removed. -Patrick