From owner-freebsd-scsi@FreeBSD.ORG Thu Aug 6 00:01:30 2009 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4DE71065672 for ; Thu, 6 Aug 2009 00:01:30 +0000 (UTC) (envelope-from tim-projects@sentinelchicken.org) Received: from sentinelchicken.org (mail.sentinelchicken.org [69.168.48.72]) by mx1.freebsd.org (Postfix) with ESMTP id 52F0A8FC0C for ; Thu, 6 Aug 2009 00:01:30 +0000 (UTC) Received: (qmail 5317 invoked from network); 6 Aug 2009 00:01:27 -0000 Received: from unknown (HELO pascal.sentinelchicken.org) (10.81.64.2) by feynman.sentinelchicken.org with ESMTPS (DHE-RSA-AES256-SHA encrypted); 6 Aug 2009 00:01:27 -0000 Received: (qmail 17398 invoked from network); 6 Aug 2009 00:01:23 -0000 Received: from shannon.sentinelchicken.org (10.81.64.4) by pascal.sentinelchicken.org with SMTP; 6 Aug 2009 00:01:23 -0000 Received: (nullmailer pid 16939 invoked by uid 1000); Thu, 06 Aug 2009 00:01:23 -0000 Date: Wed, 5 Aug 2009 17:01:23 -0700 From: Tim To: d@delphij.net Message-ID: <20090806000123.GJ2654@sentinelchicken.org> References: <20090805013213.GF2654@sentinelchicken.org> <4A7A19F3.1040207@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A7A19F3.1040207@delphij.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-scsi@freebsd.org Subject: Re: "Inappropriate ioctl for device" when using scsi_sg 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: Thu, 06 Aug 2009 00:01:30 -0000 Xin, Thanks much for your response. > My understanding is that, by default (GENERIC), sg device is not > compiled into the kernel, so, in order to use it, you may have to > compile your own kernel and add: > > device sg > > In the configuration. The device would appear as "/dev/sg0", etc.; > Linux style "/dev/sga /dev/sgb" would appear as symlinks. I figured it might be something like that. Oddly, Linux allows me to send these special SCSI commands directly to the original disk devices (such as /dev/sd{a,b,c,..}) without the need for using any sg-specific device files. Using /dev/sg{0,...} is not a problem though. I'll have to find a system to do a full install on and get that compiled in. Thanks again, tim