From owner-svn-src-all@freebsd.org Tue Apr 19 21:19:30 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 5BB2BB144AD; Tue, 19 Apr 2016 21:19:30 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-yw0-x22f.google.com (mail-yw0-x22f.google.com [IPv6:2607:f8b0:4002:c05::22f]) (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 15E1D19B4; Tue, 19 Apr 2016 21:19:30 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: by mail-yw0-x22f.google.com with SMTP id g133so29021503ywb.2; Tue, 19 Apr 2016 14:19:30 -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=hTfVjqqZ8cNzzQAf3RBIN3bMRR4lhIhgJxlS1unhaso=; b=WuFOz5eCXL94ZCm6NdztIB6x85cJ5EdR/q5+kAsWcmIqN0igSPo1x/pIAE147x3M0f GaFUrSl9En6OfhgM7NuSWzPoGZY8djgylOTAMECwo/S7xE9kXyGCD2YRTGSrfXmcCEbe O9gP/M5/2iiuYkB8KY1TcjfWidjxoklGHxAtP68i2gK/7FMlXVcE3wTcfNvYAUJbdFcm AK5jGksS8tPtG5kaQrWI9ONh3Z9BDem+IVcBElR/92H+VuNfTA9kYRbF3JsKLWvA3Dec Qhwgr9ZdUFfmM9o0HBHrv3B7TgHOscnvTBQOF01HGBUOirmxlD47U8ytyLYsI5NH4zIs sk/g== 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=hTfVjqqZ8cNzzQAf3RBIN3bMRR4lhIhgJxlS1unhaso=; b=MVYd2HJ7SpJXl51laa4lxxznMkDtV8AVBau07EJnUkrTB9pH/pE6g5CTN8ivh7T/8w E5wGrwEM0Jyj6T2xf4kclkH0I6qHJ5yYPukE3rlDT9b4TgIWU0O1PuUgPgntXDL52H2L lIjSrec8SjM9eLE8AALoJtaTLR2zDuqI0/1nDf3G1EqB+PpzbdbGCrlq4tMiO1fGEel9 +a7fxZz7aTQn33rjnVPI1MTxyv6SEnfL3Je4zncH9MM5Of96HabLEBDrlVSEIRvid+Fr jZssKe6G+gv8ZMr6iRjWsWVcHW9sdBOEwqoiKA/NnWdoo1tX269R6Ea0nHVR3J4RGbKv 1q+g== X-Gm-Message-State: AOPr4FXzd1SJaE8nZB3rv7JcAosYmiExZch/2GZxjluRCoYQS7LwRleAfxZ3MGDXWHwZ2TnP/CH/wDifPU4y7A== MIME-Version: 1.0 X-Received: by 10.129.38.10 with SMTP id m10mr3489135ywm.183.1461100769272; Tue, 19 Apr 2016 14:19:29 -0700 (PDT) Sender: pkelsey@gmail.com Received: by 10.129.27.14 with HTTP; Tue, 19 Apr 2016 14:19:29 -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 17:19:29 -0400 X-Google-Sender-Auth: 4GdxdDZ9wZCXiEkm3eV-u-jtGsQ 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 21:19:30 -0000 On Tue, Apr 19, 2016 at 4:41 PM, Patrick Kelsey wrote: > > > > 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. > > > For reference, my original patchset and the work-in-progress update Luiz sent me a few months later are now available at https://people.freebsd.org/~pkelsey/mmcspi/ -Patrick