From owner-freebsd-hackers Thu Oct 29 16:01:03 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA18216 for freebsd-hackers-outgoing; Thu, 29 Oct 1998 16:01:03 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA18183 for ; Thu, 29 Oct 1998 16:00:55 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost.cdrom.com [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id PAA00968; Thu, 29 Oct 1998 15:59:26 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199810292359.PAA00968@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Roger Hardiman cc: Mike Smith , hackers@FreeBSD.ORG Subject: Re: Kernel config - passing flags to a PCI device In-reply-to: Your message of "Wed, 28 Oct 1998 19:07:53 GMT." <36376B89.41C6@cs.strath.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 29 Oct 1998 15:59:26 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Roger wrote > > > Is it possible to pass flags from a kernel config to a PCI device > > > I would like them in the bt848/878 driver. > > > eg, device bktr0 flags 0x0103 > > > > > Mike wrote > > No. You should be detecting this automatically > > anyway; that's what PCI is for. > > I agree you can read a manufacturer and model number from PCI chips. > Very usefull too. > In my case, I need the flags for things you cannot discover from the > PCI chipset. I'm curious; how does the vendor-supplied software know whether it's talking to the right sort of card? Does it just make assumptions? > CASE 2: On the Bt848 based frame grabbers, all you can get back from > the PCI probe is "Manufacturer - Brooktree" and "model - BT848" Each of > the different TV cards based on the bt848 use different tuner types. > There is no way to probe the card to determine the tuner type or the OEM > of the TV card. Currently, there are more kernel options and even some > sysctls to specify this to the kernel driver. I would like this to be in > a flags setting for each card. Use an ioctl to configure the driver on a per-device basis. Have a control app that reads a configuration file using a user-supplied model name as an index. Don't get sidetracked by a stupid anti-ioctl flameware again. Alternatively, use a sysctl node and instantiate multiple settings groups yourself. This sucks more than it should because of the way that sysctl works at the moment. > So, back to the question. How can I pass flags to a PCI device? You don't. You never will. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message