From owner-freebsd-questions Fri May 10 07:50:43 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id HAA23426 for questions-outgoing; Fri, 10 May 1996 07:50:43 -0700 (PDT) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id HAA23410 for ; Fri, 10 May 1996 07:50:39 -0700 (PDT) Received: from hda.com (ip38-max1-fitch.zipnet.net [199.232.245.38]) by who.cdrom.com (8.6.12/8.6.11) with ESMTP id HAA28219 for ; Fri, 10 May 1996 07:24:49 -0700 Received: (from dufault@localhost) by hda.com (8.6.11/8.6.9) id KAA28289; Fri, 10 May 1996 10:29:22 -0400 From: Peter Dufault Message-Id: <199605101429.KAA28289@hda.com> Subject: Re: MO disk support ? To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Date: Fri, 10 May 1996 10:29:22 -0400 (EDT) Cc: questions@FreeBSD.ORG In-Reply-To: <199605091841.UAA02564@labinfo.iet.unipi.it> from "Luigi Rizzo" at May 9, 96 08:41:18 pm Reply-to: hdalog@zipnet.net X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Hi, > I have a Sony MO SCSI disk (~120MB) which I'd like to use. Back in 1.1.5 > times, I just modified scsiconf.c by adding the following entry > > { > T_OPTICAL, T_REMOV, "SONY", "SMO-F331-00" > ,"1.24", "sd", SC_ONE_LU | SC_SHOWME > }, > > > in the knowndevs[] array, and everything went fine. I could use the > disk as a regular hd, could even boot from it, and change disks when it > was unmounted. > > With 2.1R, this appears not to work: the disk is assigned the > "uk" device instead of "sd" as I'd like to. > > scsi_selectdev() returns the correct entry, but then the drive is > somehow not recognised as an "sd" device. I guess the problem occurs > somewhere later in the process, such as in scsi_device_lookup() > or so, but it is not clear to me how to fix this (assuming there is an > easy way ?). I think I'm the one who broke this, or at least formalized the breakage if it was broken when I got my hands on it. The best fix is probably similar to what is in -current: Add a "driver" member to override driver selection with: > struct scsidevs { > u_int32_t type; > u_int32_t driver; /* normally the same as type */ Add the initialization to the knowndevs table, duplicating most except specifying the driver you want to use for your entry: > { > T_OPTICAL, T_DIRECT, T_REMOV, "SONY", "SMO-F331-00" > ,"1.24", "sd", SC_ONE_LU | SC_SHOWME > }, > then change the device selection to use the new member at the bottom of scsi_probedev: > *type_p = > bestmatch->driver; > return bestmatch; -- Peter Dufault Real-Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267