From owner-freebsd-scsi Wed Apr 3 21:49:23 2002 Delivered-To: freebsd-scsi@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 8EBEF37B400 for ; Wed, 3 Apr 2002 21:49:19 -0800 (PST) Received: (from ken@localhost) by panzer.kdm.org (8.11.6/8.9.1) id g345n9576999; Wed, 3 Apr 2002 22:49:09 -0700 (MST) (envelope-from ken) Date: Wed, 3 Apr 2002 22:49:08 -0700 From: "Kenneth D. Merry" To: Yassar S Cc: freebsd-scsi@FreeBSD.ORG Subject: Re: SCSI Callback function not getting called Message-ID: <20020403224908.A76900@panzer.kdm.org> References: <755FA95DB839D211856B0008C7287D930F3286DC@kecmsg02.ad.infosys.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <755FA95DB839D211856B0008C7287D930F3286DC@kecmsg02.ad.infosys.com>; from yassars@infy.com on Thu, Apr 04, 2002 at 09:15:25AM +0530 Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Thu, Apr 04, 2002 at 09:15:25 +0530, Yassar S wrote: > I'm not writing a driver. I'm writing an application which uses > the SIM calls like scsi_read_write etc. Those aren't SIM calls. The SIM layer (SIM == System Interface Module) is the layer where the various SCSI and FC drivers live. Functions like scsi_read_write() fill CCBs, they don't actually execute any I/O. You probably want to look at the cam(3) man page, and in particular you'll want to look at the camcontrol(8) source, located in src/sbin/camcontrol. That's probably the best example of how to issue SCSI commands from userland. The short answer to your original question is: scsi_read_write() and the other commands like it just fill CCBs, they don't actually execute I/O. In addition, the callback function pointer is only used in the kernel, not in userland. In userland, CCBs are currently issued synchronously, so there is no need for a callback function anyway. Ken -- Kenneth Merry ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message