mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Friesen <cfriesen@nortelnetworks.com>
To: linux-kernel@vger.kernel.org
Subject: recommended method for hardware to report events to userspace?
Date: Wed, 19 Jun 2002 11:15:35 -0400	[thread overview]
Message-ID: <3D10A017.C22CDD0D@nortelnetworks.com> (raw)


I'm doing some work on a SONET PHY and I was wondering what the recommended
method is for asynchronously reporting events to userspace.

I have some non-critical events (correctable ecc errors, etc) that I poll every
once in a while, but there are some critical events (loss of signal, for
instance) that I want to report immediately.

What is the usual way of doing this?  I see three possibilities: 1) the
userspace app could register its pid with the driver using ioctl() and on a
fault the interrupt handler in the driver could fire off a signal to the
registered pids to alert them that something happened, at which point they do
another ioctl() to find out exactly what it was,  2) use netlink to provide a
socket-based notification of what happened,  3) provide a file descriptor that
becomes readable when an event happens.

What's the Right Thing to do here?


Thanks,
Chris

-- 
Chris Friesen                    | MailStop: 043/33/F10  
Nortel Networks                  | work: (613) 765-0557
3500 Carling Avenue              | fax:  (613) 765-2986
Nepean, ON K2H 8E9 Canada        | email: cfriesen@nortelnetworks.com

             reply	other threads:[~2002-06-19 15:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-19 15:15 Chris Friesen [this message]
2002-06-19 16:15 ` Tommy Reynolds

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=3D10A017.C22CDD0D@nortelnetworks.com \
    --to=cfriesen@nortelnetworks.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®