Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Oct 1998 15:59:26 -0800
From:      Mike Smith <mike@smith.net.au>
To:        Roger Hardiman <roger@cs.strath.ac.uk>
Cc:        Mike Smith <mike@smith.net.au>, hackers@FreeBSD.ORG
Subject:   Re: Kernel config - passing flags to a PCI device 
Message-ID:  <199810292359.PAA00968@dingo.cdrom.com>
In-Reply-To: Your message of "Wed, 28 Oct 1998 19:07:53 GMT." <36376B89.41C6@cs.strath.ac.uk> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810292359.PAA00968>