From owner-freebsd-scsi@FreeBSD.ORG Wed Jan 14 12:39:44 2004 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E30716A4CE for ; Wed, 14 Jan 2004 12:39:44 -0800 (PST) Received: from msgbas1x.cos.agilent.com (msgbas1x.cos.agilent.com [192.25.240.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7989E43D54 for ; Wed, 14 Jan 2004 12:39:41 -0800 (PST) (envelope-from chuck_tuffli@agilent.com) Received: from relcos2.cos.agilent.com (relcos2.cos.agilent.com [130.29.152.237]) by msgbas1x.cos.agilent.com (Postfix) with ESMTP id E879025936 for ; Wed, 14 Jan 2004 13:39:40 -0700 (MST) Received: from rtl.rose.agilent.com (rtl.rose.agilent.com [130.30.179.189]) by relcos2.cos.agilent.com (Postfix) with ESMTP id 97A1C310 for ; Wed, 14 Jan 2004 13:39:40 -0700 (MST) Received: from cre85086tuf.rose.agilent.com (cre85086tuf [130.30.174.150]) ESMTP id MAA24512 for ; Wed, 14 Jan 2004 12:39:39 -0800 (PST) Received: by cre85086tuf.rose.agilent.com (Postfix, from userid 1001) id E898A19E290; Wed, 14 Jan 2004 12:18:54 -0800 (PST) Date: Wed, 14 Jan 2004 12:18:54 -0800 From: Chuck Tuffli To: freebsd-scsi@freebsd.org Message-ID: <20040114201854.GB15642@cre85086tuf.rose.agilent.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Subject: target driver question X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2004 20:39:44 -0000 Hi - I'm creating a target driver and ran across something that can be trivially fixed, but which makes me wonder if I don't understand what is going on. When this driver receives a CDB, it needs to save away some information specific to that IO for later use in the CONT_TARGET_IO phase. I mistakenly thought that the ccb that the driver passed up in ATIO would be the same ccb that it would get back for CTIO. As such, the driver saved away a pointer to the IO specific info it needed in ccb->ccb_h.sim_priv.entries[0].ptr It would be easy enough in scsi_target(8) to copy the SIM private data from the ATIO structure to the CTIO structure. Is this the right thing to do though? Thanks! -- Chuck Tuffli Agilent Technologies, Storage Area Networking