From: Mike Hibler <mike@fast.cs.utah.edu>
To: alex@linuxcare.com, bri@mojo.calyx.net
Cc: deller@gmx.de, grundler@cup.hp.com, parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] TODO-list entry of "HIL keyboard driver needs updating"
Date: Mon, 5 Mar 2001 11:27:36 -0700 (MST) [thread overview]
Message-ID: <200103051827.LAA04397@fast.cs.utah.edu> (raw)
> Date: Mon, 5 Mar 2001 12:26:46 -0500 (EST)
> From: "Brian S. Julin" <bri@mojo.calyx.net>
> To: Alex deVries <alex@linuxcare.com>
> Subject: Re: [parisc-linux] TODO-list entry of "HIL keyboard driver needs updating"
>
>
> The main sticking point I have with the HIL hardware which
> has an effect on the way I write the linux-input driver,
> concerns whether or not there is a safe way for me to
> leave the auto-polling enabled always, or whether it will have
> to be turned off when a hil packet starts, and the driver
> must go register a timer task to go poll the chip until
> the packet is over. It centers around a comment in the
> BSD driver:
>
> /*
> * Send a command to a device on the loop.
> * Since only one command can be active on the loop at any time,
> * we must ensure that we are not interrupted during this process.
> * Hence we mask interrupts to prevent potential access from most
> * interrupt routines and turn off auto-polling to disable the
> * internally generated poll commands.
> */
>
> Amazingly, all the drivers I find seem to be happy to
> tie up the CPU and busy wait on the HIL bus in some
> places, which is "just not good"(tm).
>
The doc clearly states that auto-polling must be disabled or you must be
certain that the timing of your data transfer does not interfere with the
polling. The recommended way was to disable auto polling.
As for disabling interrupts, its been a long time and I'm not sure what the
hell we meant by "Hence we mask interrupts to prevent potential access
from most interrupt routines". You may want to disable interrupts to get
on and off the loop as quick as possible to avoid dropping input chars.
> Basically I need to know if there really is the chance
> that during a packet send operation I will be interrupted
> by an internally generated poll command, or if they were
> just being paranoid.
>
Just following directions! :-) Don't think we ever tried it without
disabling auto polling, so I don't know what the consequences of
interfering with a poll would be, probably not good.
> BTW, writing drivers with nothing but other people's source
> code to look at really is not my favorite activity. I am always
> left with the impression that there could be a hardware feature
> that the other authors ignored that would make the code better
> or simpler. I am guessing that HP has managed to put
> mountains of paperwork in the way of getting hardware docs,
> and that my saying this won't help, but I am willing to sign
> an NDA for the HIL docs.
>
Understandable. Yes, we went for simple and straight-forward when writing
the drivers and didn't always exploit "special features" of the hardware.
My experience with such special HW features is that they make drivers more
complicated with little added benefit.
Anyway, I have been using the BSD HIL driver daily for 14 years or so now,
and haven't had any significant problems.
Mike
next reply other threads:[~2001-03-05 18:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-05 18:27 Mike Hibler [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-03-06 21:56 [parisc-linux] TODO-list entry of "HIL keyboard driver needs u pdating" 5116
2001-03-07 9:00 ` [parisc-linux] TODO-list entry of "HIL keyboard driver needs updating" Alex deVries
2001-03-09 19:52 ` 5116
[not found] <00121503462102.00304@P100>
2001-03-05 5:20 ` Brian S. Julin
2001-03-05 7:07 ` Grant Grundler
2001-03-05 16:51 ` Alex deVries
2001-03-05 17:26 ` Brian S. Julin
2001-03-05 4:47 Mattias Wadenstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200103051827.LAA04397@fast.cs.utah.edu \
--to=mike@fast.cs.utah.edu \
--cc=alex@linuxcare.com \
--cc=bri@mojo.calyx.net \
--cc=deller@gmx.de \
--cc=grundler@cup.hp.com \
--cc=parisc-linux@lists.parisc-linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox