Commit 4d1566ed authored by Kay Sievers's avatar Kay Sievers Committed by James Bottomley
Browse files

[SCSI] fix media change events for polled devices

  a341cd0f (SCSI: add asynchronous event notification API)

 (sr,sd: send media state change modification events)
by introducing an event filter, which is removed here, to make
events, we are depending on, happen again.

Fix this by removing the event filter.  It's pretty much broken at the
moment, since a user can't set it (the attribute being read only).  A
proper fix will be to make the event discriminator distinguish between
AN and Polled media change events.

Cc: David Zeuthen <>
Cc: kristen accardi <>
Cc: Jeff Garzik <>
Signed-off-by: default avatarKay Sievers <>
Signed-off-by: default avatarJames Bottomley <>
parent c02e6002
......@@ -2162,10 +2162,15 @@ void sdev_evt_send(struct scsi_device *sdev, struct scsi_event *evt)
unsigned long flags;
#if 0
/* FIXME: currently this check eliminates all media change events
* for polled devices. Need to update to discriminate between AN
* and polled events */
if (!test_bit(evt->evt_type, sdev->supported_events)) {
spin_lock_irqsave(&sdev->list_lock, flags);
list_add_tail(&evt->node, &sdev->event_list);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment