From owner-freebsd-embedded@FreeBSD.ORG Tue Oct 8 22:57:27 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B145AE1B; Tue, 8 Oct 2013 22:57:27 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [IPv6:2607:f8b0:400e:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7D0FC28E5; Tue, 8 Oct 2013 22:57:27 +0000 (UTC) Received: by mail-pa0-f51.google.com with SMTP id kp14so128155pab.38 for ; Tue, 08 Oct 2013 15:57:27 -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:content-type; bh=Jx/RfDvgZu71XhXiOPRD/Sz29TZa6hz0HdrPTaefD9M=; b=PE0u59pi3ik/gwVR0IoKpFgA3RDMLkiAszffQJGVEIzdjbFTntihXP6ick1cSSQORq v/goJ3sX1lmJEv9DVa/6KmiK+khcSNzg3aDiYzreh7MRAcKZvLKFwN60J2roMDWK9qQT pmjj9hK3xWC8/uelcnrW6oRXIe/tsuPb/BiVT5JWooRSriH4IPkcpVt8T7x9dV7k07h1 nKVhEDKH6A++Ik8m+jlo8GtWotSyRXkskq/GzyrMBhiHwquMdGKDQNrlYW1hKgrEosjs Y7bhdPIWZo8WWjlEoFdB6MLdH4DKo8L6CjH0lWVU6x2OZGH/wRSqgDe3a63S5oZ/kHUp QQQw== MIME-Version: 1.0 X-Received: by 10.66.163.164 with SMTP id yj4mr6178208pab.91.1381273047076; Tue, 08 Oct 2013 15:57:27 -0700 (PDT) Sender: mavbsd@gmail.com Received: by 10.68.149.68 with HTTP; Tue, 8 Oct 2013 15:57:26 -0700 (PDT) Received: by 10.68.149.68 with HTTP; Tue, 8 Oct 2013 15:57:26 -0700 (PDT) In-Reply-To: <5254892B.3050507@bakulin.de> References: <5251A9D3.1080803@bakulin.de> <5251C911.6020003@FreeBSD.org> <4FB11076-DD88-43F2-A449-E41D2088A4DD@bsdimp.com> <5254892B.3050507@bakulin.de> Date: Wed, 9 Oct 2013 01:57:26 +0300 X-Google-Sender-Auth: BQQVgM0c8tsIgbsFVBUjDC6-N44 Message-ID: Subject: Re: SDIO for FreeBSD From: Alexander Motin To: Ilya Bakulin X-Mailman-Approved-At: Tue, 08 Oct 2013 23:52:54 +0000 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Adrian Chadd , Alexander Motin , freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Oct 2013 22:57:27 -0000 09.10.2013 1:37 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D8 "Ilya Bakulin" =CE=C1=D0=C9=D3=C1=CC: > > On 07.10.13 01:19, Warner Losh wrote: > > I've often thought that having an SDIO protocol for CAM would be where we'd wind up because once you start adding in GPIO pin interrupt signalling, message "interrupt" signaling, message completion, etc, it looks a lot like many of the mechanisms we have in CAM... I'm not at all sure that USB is the right model to use, frankly... But it does have some superficial similarities... > > > > Warner > > The idea seems to be interesting -- at least we can reuse the CAM queues > and interrupt handling algorithms... > One thing that I'd like to ask after initial reading about CAM in FreeBSD= : > is it possible for SIM devices to initiate data transfer? > the CAM subsystem is primarily used for storage devices, > where the host issues a SCSI command, schedules it to the SIM, > and then SIM receives an interrupt from the h/w and updates the existing > CCB, > signaling command completion. > > In SDIO case we can have the interrupts from the card > that are not associated with any previous command. > Is it possible to handle such situation using CAM framework? CAM has mechanism of asynchronous notifications, that is quite alike to interupts. On the other side, target mode drivers in CAM are using different concept with requests that just wait inside the controller or its driver to be completed on next incoming request, carying requst data inside.