From owner-freebsd-scsi Sun Jul 26 12:14:52 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA25642 for freebsd-scsi-outgoing; Sun, 26 Jul 1998 12:14:52 -0700 (PDT) (envelope-from owner-freebsd-scsi@FreeBSD.ORG) Received: from panzer.plutotech.com (ken@panzer.plutotech.com [206.168.67.125]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA25634 for ; Sun, 26 Jul 1998 12:14:49 -0700 (PDT) (envelope-from ken@panzer.plutotech.com) Received: (from ken@localhost) by panzer.plutotech.com (8.8.8/8.8.5) id NAA20680; Sun, 26 Jul 1998 13:14:17 -0600 (MDT) From: "Kenneth D. Merry" Message-Id: <199807261914.NAA20680@panzer.plutotech.com> Subject: Re: pass device usage questions In-Reply-To: from Cory Kempf at "Jul 26, 98 02:37:42 pm" To: ckempf@enigami.com (Cory Kempf) Date: Sun, 26 Jul 1998 13:14:17 -0600 (MDT) Cc: freebsd-scsi@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28s (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Cory Kempf wrote... > I am looking at the cdrecord scsi source, which seems to be pointing > me at the pass devices. > > My guess is that there should be one pass device for each SCSI device > attached to the system? Right. > And this should be configured in the kernel config file, as well as > /dev via MAKEDEV? Right. > Or is there a way to somehow autoconfigure these things? What do you mean, autoconfigure them? If you have: device pass0 in your kernel config file, the passthrough device will attach to every SCSI device you have. You make as many passthrough devices as you have devices in your system, like: cd /dev sh MAKEDEV pass8 That will make pass[0-7]. > What is the xpt device? Does it figure in anywhere? It is the transport layer device. Among other things, it is what the userland CAM library uses to figure out which passthrough device corresponds to a "regular" device. e.g. pass4 points to the same device as da2. > Assuming the above is true, are the pass devices the recommended way > to talk with random (e.g. non-HD / tape / CD) scsi devices? Or is > there something else that I should be using? It depends on what you want to do. If you want to send SCSI commands directly to the device, you would use the passthrough driver. If you want an interface to the device, you would use the normal device driver for it. For instance, the cd driver has an ioctl interface, as does the ch driver. In most cases, the ioctl or read/write interfaces are used to talk to devices. Ken -- Kenneth Merry ken@plutotech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message