Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jun 1998 21:01:19 +0800
From:      Peter Wemm <peter@netplex.com.au>
To:        Zach Heilig <zach@gaffaneys.com>
Cc:        Mike Smith <mike@smith.net.au>, bde@zeta.org.au, current@FreeBSD.ORG
Subject:   Re: ppbus is broken. 
Message-ID:  <199806281301.VAA07986@spinner.netplex.com.au>
In-Reply-To: Your message of "Sun, 28 Jun 1998 04:54:53 EST." <19980628045453.B650@znh.org.> 

next in thread | previous in thread | raw e-mail | index | archive | help
Zach Heilig wrote:
> BTW, I just tried this again (with a fairly recent [june 25] kernel).
> relevant kernel config lines:
> 
> controller	ppbus0
> device		nlpt0	at ppbus?
> controller	ppc0	at isa? port? tty irq 7 vector ppcintr
> 
> detected as:
> 
> ppc0 at 0x378 irq 7 on isa
> ppc0: Generic chipset in EPP mode (EPP 1.9)
> nlpt0: <generic printer> on ppbus 0
> nlpt0: Interrupt-driven port
> 
> I can't say for sure that it is fixed, but at least one pdf that used get hos
    ed
> comes out properly.

It's a real shame that the 'tty', 'bio', 'net' flags and the 'vector
xxxintr' are required.  It's quite a simple change to config(8) and struct
isa_device and isa.c to enable isa drivers to register their own interrupt 
handler and mask at probe time.

The best part is that it can be done incrementally..  We can add an
id_maskptr field, and have config generate an single 'isa_devtab' rather
than an 'isa_devtab_bio', 'isa_devtab_net', etc.  If the mask is specified 
in the config file, it would be used to initialize the field.  The driver 
can change this at probe time, and isa.c will automatically use it.

It would then become:
controller	ppc0	at isa? port? irq 7
but the old specification would still be accepted just fine (but would 
essentially be ignored).

I don't know how this fits in with the future plans for interrupt 
registration etc, but it's a low impact change that can be gradually 
taken advantage of in drivers.  This will become more of an issue with 
CAM, since it's driver interrupts are masked by 'cam' rather than 'bio', 
and it's very easy to get subtle (but very destructive) problems if the 
user 'forgets' to change all the 'bio' flags to 'cam'.  It would be better 
if it wasn't required and was essentially ignored.  The device driver 
knows this information best, there's no need to duplicate it in the config 
file.

Cheers,
-Peter
--
Peter Wemm <peter@netplex.com.au>   Netplex Consulting



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



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