From owner-freebsd-current@FreeBSD.ORG Tue Oct 18 09:34:24 2011 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCABB10657C4 for ; Tue, 18 Oct 2011 09:34:24 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 666208FC16 for ; Tue, 18 Oct 2011 09:34:23 +0000 (UTC) Received: from [192.168.99.1] (helo=terran.dlink.ua) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1RG5jk-0008Gd-P3; Tue, 18 Oct 2011 12:13:29 +0300 Date: Tue, 18 Oct 2011 12:15:40 +0300 From: Aleksandr Rybalko To: Adrian Chadd Message-Id: <20111018121540.a402040e.ray@dlink.ua> In-Reply-To: References: <20111017194940.ed720115.ray@ddteam.net> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Aleksandr Rybalko , current@freebsd.org Subject: Re: SPI rework X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2011 09:34:24 -0000 On Tue, 18 Oct 2011 06:17:46 +0800 Adrian Chadd wrote: >> Hi, >> >> That sounds logical to me. Maybe getting it done before 9.0-RELEASE >> is a bit rushed? >> >> I can help you test out the flash side of things on my atheros SoC >> boards. >> >> >> Adrian More thinking give me a better way to fix that. We leave same structure, but remove KASSERT(cmd->tx_cmd_sz == cmd->rx_cmd_sz,""); and fix SPI controllers drivers to care about possible different sizes. And of course will fix consumers to set exact what they need. (dev/flash: cmd_tx_sz=1, data_rx_sz=3 for "device ID" call) That way better because we will have ability to duplex SPI transfers on controllers that able to do that, RT305x SPI will return error in case when sizes specified for both directions. Comments? WBW -- Alexandr Rybalko aka Alex RAY