From: Tejun Heo <tj@kernel.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: Problems with sr_get_events
Date: Mon, 16 Apr 2012 15:55:12 -0700 [thread overview]
Message-ID: <20120416225512.GH12421@google.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1204080858300.11397-100000@netrider.rowland.org>
Hello, Alan. Sorry about the delay.
On Sun, Apr 08, 2012 at 09:24:32AM -0400, Alan Stern wrote:
> There are several closely related issues involving sr_get_events().
>
> The first may just be confusion on my part. You've got a
> cd->ignore_get_event flag, whose name seems to mean that the result
> from sr_get_events() should be ignored. But the result isn't ignored
> entirely; only the DISK_EVENT_MEDIA_CHANGE bit is cleared.
>
> Furthermore, if you really do intend to ignore the result from
> sr_get_events() then why call it in the first place? Or does the flag
> actually mean that you want to ignore the media-change bit from
> get_events while still using the other bits?
The only thing which caused actual problem was media changed
detection. This being a workaround for badly broken hardware, I think
it would be better to keep the behavior minmially deviated from the
normal path. Let's say it's abbreviation of
->ignore_media_changed_from_get_event.
> Finally, the GET_EVENT_STATUS_NOTIFICATION command is not present in
> all versions of SCSI, and not all drives support it. sr_get_events()
> should check for an ILLEGAL_REQUEST sense key and stop sending the
> command if it is found. Maybe a new flag will be needed for this.
Hmmm... Maybe but we've been sending GET_EVENT without such provision
for very long time now. I feel reluctant to change something which
seems to work in this area even if that something is technically
wrong. It's not like cheap USB devices tend to be technically correct
anyway.
Thanks.
--
tejun
next prev parent reply other threads:[~2012-04-16 22:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-08 13:24 Problems with sr_get_events Alan Stern
2012-04-16 22:55 ` Tejun Heo [this message]
2012-04-17 15:33 ` Alan Stern
2012-04-17 15:38 ` Tejun Heo
2012-04-17 15:46 ` Alan Stern
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=20120416225512.GH12421@google.com \
--to=tj@kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/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