bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: oskit driver for i8042 keyboard controller


From: Roland McGrath
Subject: Re: oskit driver for i8042 keyboard controller
Date: Tue, 12 Nov 2002 22:59:18 -0500 (EST)

D'oh!  I was definitely confused there.  I reverted the bumping of the ref
count.  But I think you were still seeing problems here.

As to the device mode thing, it's definitely not quite right.  The issue is
how much you want to avoid reopening the device at the COM layer,
i.e. calling the driver's open routine.  This could matter in case the
driver doesn't allow multiple opens, or multiple writers, or whatever.

Right now it avoids it except in the case that the needed access wasn't
requested the first time, at the cost you noted of not enforcing access on
open ports.  The simple change you can do is make dev_hash_lookup just
match mode == device->mode.  Then there can be up to three driver open
calls (read, write, read/write).  

The hairier change would be to make it create a new device_t when the mode
doesn't match, but instead of reopening the COM device just clone its open
state (the type-specific stuff in struct device, could be done with another
hook in struct device_ops).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]