From: Kay Sievers Date: Wed, 19 Mar 2008 12:04:47 +0000 (+0100) Subject: [SCSI] fix media change events for polled devices X-Git-Tag: v2.6.25-rc7~58^2~1 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=4d1566ed2100d074ccc654e5cf2e44cdea3a01d0;p=linux-2.6-omap-h63xx.git [SCSI] fix media change events for polled devices Commit: a341cd0f (SCSI: add asynchronous event notification API) breaks: 285e9670 (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: Kay Sievers Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index ba21d97d185..f40898dc2d1 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -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)) { kfree(evt); return; } +#endif spin_lock_irqsave(&sdev->list_lock, flags); list_add_tail(&evt->node, &sdev->event_list);