[lkml]   [2002]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Asynchronous CDROM Events in Userland
On Sun Feb 03, 2002 at 11:41:47PM -0500, Calin A. Culianu wrote:
> Is there any way, other than by polling, to have a user process be
> notified of a change in status on a cdrom drive? (Such as if the drive
> opens, closes, gets new media, etc)?

Nope. It would be nice, but the current crop of hardware simply
doesn't support it. From the Mt. Fuji spec (SFF8090i) 11.5 Get
Event/Status Notification:

The GET EVENT/STATUS NOTIFICATION Command requests the Logical Unit to
report event(s) and status as specified in the Notification
ClassNotification Class Request field and provides asynchronous
notification. Two modes of operation are defined here. They are
polling and asynchronous modes.

In polling mode, the Host will issue GET EVENT/STATUS NOTIFICATION
Commands at periodic intervals with an immediate (Immed) bit of 1 set.
The Logical Unit shall complete this Command with the most recently
available event status requested. The Logical Unit shall support
polling mode.

In asynchronous mode, the Host will issue a single GET EVENT/STATUS
NOTIFICATION Command with an Immed (immediate) bit of 0 requested. If
the Logical Unit supports Asynchronous event status notification
(through tagged queuing) the model outlined here shall be used. If the
Logical Unit does not support Asynchronous Mode, the Command shall
fail as an illegal request. If the Host requests Asynchronous Mode
using a non-queable or non-overlappable request, the Command shall

Jens Axboe and I wrote a little test app a year or two ago to check
for whether drives supported asynchronous mode. We found it to be
unsupported on 100% of the drives we tested (and we tested quite a


Erik B. Andersen
--This message was written using 73% post-consumer electrons--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:18    [W:2.184 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site