public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: scsi <linux-scsi@vger.kernel.org>, David Zeuthen <david@fubar.dk>,
	kristen accardi <kaccardi@gmail.com>,
	Jeff Garzik <jeff@garzik.org>
Subject: Re: [PATCH] fix media change events for polled devices
Date: Wed, 19 Mar 2008 11:54:02 -0500	[thread overview]
Message-ID: <1205945642.11527.23.camel@localhost.localdomain> (raw)
In-Reply-To: <1205928287.8810.18.camel@lov.site>

On Wed, 2008-03-19 at 13:04 +0100, Kay Sievers wrote:
> Hi James,
> we like to see this in 2.6.25, as "change" events for polled devices are
> broken at the moment.

I'm not happy just killing the code, since when the AN infrastructure
gets fixed, it will work.  How about this instead as a fix for 2.6.25?

Also, acks from Jeff and Kristin would be nice.

James

---
>From 4d1566ed2100d074ccc654e5cf2e44cdea3a01d0 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers@vrfy.org>
Date: Wed, 19 Mar 2008 13:04:47 +0100
Subject: [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 <david@fubar.dk>
Cc: kristen accardi <kaccardi@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
---
 drivers/scsi/scsi_lib.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index ba21d97..f40898d 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);
-- 
1.5.4.1





  reply	other threads:[~2008-03-19 19:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-19 12:04 [PATCH] fix media change events for polled devices Kay Sievers
2008-03-19 16:54 ` James Bottomley [this message]
2008-03-20  1:18   ` Kay Sievers
2008-03-20  1:25     ` James Bottomley
2008-03-20  2:16       ` Kay Sievers

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=1205945642.11527.23.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=david@fubar.dk \
    --cc=jeff@garzik.org \
    --cc=kaccardi@gmail.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-scsi@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