From owner-freebsd-scsi Mon Aug 21 22:29:14 1995 Return-Path: freebsd-scsi-owner Received: (from majordom@localhost) by freefall.FreeBSD.org (8.6.11/8.6.6) id WAA03779 for freebsd-scsi-outgoing; Mon, 21 Aug 1995 22:29:14 -0700 Received: from duality.gnu.ai.mit.edu (duality.gnu.ai.mit.edu [18.43.0.236]) by freefall.FreeBSD.org (8.6.11/8.6.6) with ESMTP id WAA03769 for ; Mon, 21 Aug 1995 22:29:12 -0700 Received: by duality.gnu.ai.mit.edu (8.6.12/8.6.12GNU) id BAA01099; Tue, 22 Aug 1995 01:29:04 -0400 Date: Tue, 22 Aug 1995 01:29:04 -0400 Message-Id: <199508220529.BAA01099@duality.gnu.ai.mit.edu> From: Charles Hannum To: dufault@hda.com Cc: joerg_wunsch@uriah.heep.sax.de, scsi@freebsd.org Subject: Re: scsiconf change Sender: freebsd-scsi-owner@freebsd.org Precedence: bulk and change scsi_selectdev to a scoring scheme: [code omitted] This is a similar idea to the pattern matcher I wrote in the NetBSD SCSI code last year. The vendor/product/revision matching can be partial, and is scored based on the number of characters that were checked, which provides even more flexibility. The patterns are stored in an array, which each driver can elect to specify a wider version of, with the beginning of each array element being assumed to be in a common format. (This is vaguely similar to how the qsort(3) interface works, so there's some precedent for it.) Currently, only the `st' driver has any driver-specific quirk info. The net effect of this design is that it has all the flexibility people have been asking for, allows each driver to have its own quirk info, and still allows the matching to be done with a common routine. I've also made a number of other structural improvements, including much better error handling, and one that effectively speeds up probing for SCSI devices by a factor of 3x. Anyone interested can inquire, or go look at the code. (Note that I'm *very* busy, so replies are likely to be glacial.)