From owner-freebsd-hackers Wed Sep 3 14:49:39 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA09966 for hackers-outgoing; Wed, 3 Sep 1997 14:49:39 -0700 (PDT) Received: from ocean.campus.luth.se (ocean.campus.luth.se [130.240.194.116]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id OAA09955 for ; Wed, 3 Sep 1997 14:49:34 -0700 (PDT) Received: (from karpen@localhost) by ocean.campus.luth.se (8.8.5/8.8.5) id XAA18864; Wed, 3 Sep 1997 23:38:13 +0200 (CEST) From: Mikael Karpberg Message-Id: <199709032138.XAA18864@ocean.campus.luth.se> Subject: Re: PnP support in userconfig In-Reply-To: <199709030949.LAA07543@labinfo.iet.unipi.it> from Luigi Rizzo at "Sep 3, 97 11:49:52 am" To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Date: Wed, 3 Sep 1997 23:38:13 +0200 (CEST) Cc: hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL31H (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk According to Luigi Rizzo: [...] > Before making the code available, I need suggestions on the following > issues. > > A PnP card can be specified using a unique integer (CSN) starting from > 1 and assigned by the operating system at boot time, or with a 32-bit > number which is the "vendor_id" for the board. Each card has a number > of "logical devices" internally, numbered starting from 0 (the number > is called LDN). > > Each card can accept up to 8 port addresses, 4 memory addresses, 2 irq > and 2 drq lines. > > My code to support PnP in userconfig accepts commands with the > following syntax: > > pnp 1 0 enable port0 0x534 irq0 7 irq1 5 drq0 3 drq1 4 .... > > where the first two parameters identify the CSN and LDN of the card. > I can replace the first parameter with the vendor_id so that the line > would become something like: > > pnp 0x0100561e 0 enable port0 ... > > with the advantage of making the same command work independently of > the CSN assigned to the card, but with the disadvantage of a longer > command and of making impossible to have two cards of the same type on > the same machine (unless one adds another 32-bit integer, the serial > number). I'd really go for the first option unless there are strong > objections. Well... How about making it possible to use both, just in case someone has a problem with knowing the CSN of the card, and only has one card of that kind. Something like: pnp 1 0 enable port0 0x534 irq0 7 irq1 5 drq0 3 drq1 4 OR pnp v0x0100561e 0 enable port0 0x534 irq0 7 irq1 5 drq0 3 drq1 4 Where both are supported? Should be a simple case like: if (*x == 'v') { vid } else { CSN } The synatx above, or the one where you specify as many as you want after the keyword shouldn't matter for this change, so that's irrelevant to this question. /Mikael