From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 3 08:28:04 2007 Return-Path: X-Original-To: scsi@freebsd.org Delivered-To: freebsd-scsi@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2985F16A402 for ; Tue, 3 Apr 2007 08:28:04 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id DBE5913C45D for ; Tue, 3 Apr 2007 08:28:03 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 361B28BCE9A for ; Tue, 3 Apr 2007 10:08:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CaR8yAXk1yak for ; Tue, 3 Apr 2007 10:08:07 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 396548BCE4A for ; Tue, 3 Apr 2007 10:08:07 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l33886AQ060834 for scsi@freebsd.org; Tue, 3 Apr 2007 10:08:06 +0200 (CEST) (envelope-from rdivacky) Date: Tue, 3 Apr 2007 10:08:06 +0200 From: Roman Divacky To: scsi@freebsd.org Message-ID: <20070403080806.GA60720@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Cc: Subject: question about fbsd scsi layer X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2007 08:28:04 -0000 hi I am trying to port some semi-driver for linux sg device from netbsd to freebsd (in linux emulation layer) and it uses scsi. the netbsd code looks basically like this: struct scsireq req; req.flags = SCCMD_WRITE; req.cmd = cmd; ...further initialization of req... ioctl(fp, SCIOCCOMAND, &req, td); return req to userland; I don't understand how to do this in FreeBSD, we don't have SCIOCCOMAND etc. can you point me in the right way? thnx roman p.s. please CC me as I am not subscribed to this ml