From owner-freebsd-scsi Fri Jun 28 21:08:27 1996 Return-Path: owner-freebsd-scsi Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id VAA02034 for freebsd-scsi-outgoing; Fri, 28 Jun 1996 21:08:27 -0700 (PDT) Received: from burdell.cc.gatech.edu (root@burdell.cc.gatech.edu [130.207.3.207]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id VAA02029 for ; Fri, 28 Jun 1996 21:08:25 -0700 (PDT) Received: from oscar.cc.gatech.edu (cau@oscar.cc.gatech.edu [130.207.107.12]) by burdell.cc.gatech.edu (8.7.5/8.6.9) with ESMTP id AAA14867; Sat, 29 Jun 1996 00:07:45 -0400 (EDT) Received: (from cau@localhost) by oscar.cc.gatech.edu (8.7.5/8.6.9) id AAA11695; Sat, 29 Jun 1996 00:07:35 -0400 (EDT) From: cau@cc.gatech.edu (Carlos Ugarte) Message-Id: <199606290407.AAA11695@oscar.cc.gatech.edu> Subject: Re: help writing a new SCSI device driver To: freebsd-scsi@freebsd.org Date: Sat, 29 Jun 1996 00:07:34 -0400 (EDT) Cc: cau@cc.gatech.edu In-Reply-To: <199606271302.XAA11215@godzilla.zeta.org.au> from "Bruce Evans" at Jun 27, 96 11:02:36 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Thanks for the help. I took a second look at the daemon book, and with the hints here it makes more sense. But I've a few more questions now... I see that KVTOPHYS is done using a function, but PHYSTOKV varies a lot (by driver). Some store the xor of the physical and kernel virtual addresses to convert between one and the other, but I'm not sure if this will work for the entire memory range... I know the SCSI bios is in a certain memory range (say, physical 0xca000); and using the PHYSTOKV macro from wd7000.c, I am actually able to check the BIOS - but I wonder if this will work at all times. This method works by adding KERNBASE to the physical address, or taking the OR of the physical address and 0xf0000000. Both work in my case, but I wonder... Also, I noticed that not all drivers seem to support disconnection/reselection. Is this because it is difficult to implement, or because it provides little improvement? All docs I've seen imply that you gain some, but never quantify how much... Is it worth the trouble, if it can be done? Carlos -- Carlos A. Ugarte cau@cc.gatech.edu Author of PageMage, a virtual desktop util for OS/2 http://www.cc.gatech.edu/people/home/cau/ If you understand what you're doing, you are not learning anything