From: Luben Tuikov <luben@splentec.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Oliver Neukum <oliver@neukum.name>,
David Brownell <david-b@pacbell.net>,
Matthew Dharm <mdharm-scsi@one-eyed-alien.net>,
Mike Anderson <andmike@us.ibm.com>, Greg KH <greg@kroah.com>,
linux-usb-devel@lists.sourceforge.net,
Linux SCSI list <linux-scsi@vger.kernel.org>
Subject: Re: [linux-usb-devel] Re: [PATCH] USB changes for 2.5.58
Date: Wed, 22 Jan 2003 16:50:11 -0500 [thread overview]
Message-ID: <3E2F1213.8090400@splentec.com> (raw)
In-Reply-To: Pine.LNX.4.44L0.0301211546410.6926-100000@ida.rowland.org
Alan Stern wrote:
> Here's another question to add to your discussion.
>
> When a device is unplugged, the system's representation of that device
> can't be removed immediately; there may be open fd's, mounts, pointers,
> and so on. Until the time comes when all these handles are released, all
> interaction with the device has to fail, one way or another.
>
> Whose responsibility is it to fail these interactions?
The transport.
When a device is plugged to the SAN/fabric (wlg) it may not be the case
that all initiators will know about it. For this reason the transport
itself, not SCSI Core, not LLDD*, will decide if the CDB is deliverable.
* An LLDD may keep a table of seen devices (depending on the transport
it provides a portal to), and thus the decision may be made there, but
this doesn't have to be the case.
(Just think of SANs/IP SANs.)
> For something simple, like a USB serial port, it might turn out that the
> low-level device driver gets all these requests and then fails them. That
> means the driver has to keep track of the fact that the device is no
> longer connected until some reference count goes to 0.
A LLDD doesn't have to keep reference counts. In the simple case
you mention above, it will check that the device is no longer reachable
and will return TARGET error, which will bubble up the layers, or the
Execute Command remote procedure will end with Service Delivery Failure
as the Service Response -- exactly the same effect as far as SCSI Core
is concerned.
The Service Response is Service Delivery Failure, in which case the
Status byte is undefined.
I've been wanting to include a Service Response into scsi_cmnd and
rename ``result'' into ``status'' to be closer to the SCSI Architecure,
for some time now, but we'll see when this will happen.
Newer drivers will make use of Service Response code, and be able to
address only by (target, lun) rather than (bus, target, lun), and
target may not be an int anymore. But this is 2.7 stuff, or maybe
a separately distributed SCSI Core and LLDDs subsystem...
> For SCSI and emulated SCSI devices, it might be the one of the SCSI layers
> that keeps track of the fact that the device has disconnected. Or it
> might be somewhere else in the kernel.
Right. For this reason I'm thinking that a higher level hook on device
disconnect (if reported by the transport) might be needed. This doesn't
mean that it has to do higher-level things, :-) , it might just call
SCSI Core, but as long as it goes through a higher layer.
> It would nice to have some sort of coherent plan for how to handle this.
> In fact, it ought to be part of the device-driver model that underlies
> sysfs. But so far as I am aware, there is currently nothing in the sysfs
> documentation to address the problem.
--
Luben
next prev parent reply other threads:[~2003-01-22 21:50 UTC|newest]
Thread overview: 104+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <10426732153816@kroah.com>
[not found] ` <10426732212871@kroah.com>
[not found] ` <20030116093112.B29001@one-eyed-alien.net>
[not found] ` <20030116173539.GA31235@kroah.com>
2003-01-16 19:43 ` [linux-usb-devel] Re: [PATCH] USB changes for 2.5.58 Matthew Dharm
2003-01-16 19:53 ` Greg KH
[not found] ` <20030116195306.GA32697@kroah.com>
2003-01-16 20:10 ` Linus Torvalds
2003-01-16 20:43 ` greg kh
2003-01-16 21:41 ` Linus Torvalds
2003-01-16 22:51 ` Matthew Dharm
2003-01-16 20:40 ` David Brownell
2003-01-16 20:48 ` Mike Anderson
2003-01-16 23:43 ` Oliver Neukum
2003-01-17 8:50 ` Mike Anderson
2003-01-17 10:55 ` Oliver Neukum
2003-01-17 15:06 ` Alan Stern
2003-01-17 18:54 ` Matthew Dharm
2003-01-17 20:25 ` Mike Anderson
2003-01-17 22:07 ` Oliver Neukum
2003-01-17 20:26 ` [linux-usb-devel] " Oliver Neukum
2003-01-17 20:49 ` Mike Anderson
2003-01-20 17:36 ` Luben Tuikov
2003-01-20 18:23 ` Oliver Neukum
2003-01-20 18:56 ` Luben Tuikov
2003-01-20 19:10 ` [linux-usb-devel] " Oliver Neukum
2003-01-20 19:50 ` David Brownell
2003-01-21 3:31 ` Alan
2003-01-21 7:17 ` Oliver Neukum
2003-01-21 11:57 ` [linux-usb-devel] " Douglas Gilbert
2003-01-21 13:48 ` Oliver Neukum
2003-01-21 18:22 ` Luben Tuikov
2003-01-21 13:30 ` James Bottomley
2003-01-20 20:08 ` David Brownell
2003-01-20 20:48 ` [linux-usb-devel] " Oliver Neukum
2003-01-20 21:24 ` David Brownell
2003-01-20 21:51 ` [linux-usb-devel] " Oliver Neukum
2003-01-20 22:26 ` David Brownell
2003-01-20 23:00 ` Oliver Neukum
2003-01-21 0:44 ` David Brownell
2003-01-21 0:50 ` Oliver Neukum
2003-01-21 18:16 ` Luben Tuikov
2003-01-21 19:00 ` Oliver Neukum
2003-01-21 20:02 ` [linux-usb-devel] " Luben Tuikov
2003-01-21 21:02 ` Alan Stern
2003-01-22 21:50 ` Luben Tuikov [this message]
2003-01-22 22:46 ` Oliver Neukum
2003-01-23 17:46 ` Luben Tuikov
2003-01-23 18:19 ` Oliver Neukum
2003-01-23 19:07 ` Luben Tuikov
2003-01-23 19:40 ` Oliver Neukum
2003-01-23 20:28 ` Doug Ledford
2003-01-23 20:59 ` Oliver Neukum
2003-01-23 21:34 ` Doug Ledford
2003-01-23 22:39 ` Oliver Neukum
2003-01-23 23:23 ` Doug Ledford
2003-01-23 23:25 ` Matthew Dharm
2003-01-24 15:34 ` Alan Stern
2003-01-24 16:06 ` Oliver Neukum
2003-01-24 17:58 ` [linux-usb-devel] " Doug Ledford
2003-01-24 19:00 ` Luben Tuikov
2003-01-24 22:23 ` Oliver.Neukum
2003-01-24 19:10 ` Luben Tuikov
2003-01-24 19:56 ` [linux-usb-devel] " Alan Stern
2003-01-24 20:11 ` Luben Tuikov
2003-01-24 21:09 ` Luben Tuikov
2003-01-24 21:55 ` Alan Stern
2003-01-24 22:03 ` Luben Tuikov
2003-01-24 23:21 ` Mike Anderson
2003-01-24 21:48 ` Doug Ledford
2003-01-24 22:59 ` Mike Anderson
2003-01-24 23:17 ` [linux-usb-devel] " Doug Ledford
2003-01-25 0:24 ` Luben Tuikov
2003-01-25 1:35 ` Mike Anderson
2003-01-24 23:25 ` Matthew Dharm
2003-01-25 0:05 ` Doug Ledford
2003-01-25 0:45 ` Matthew Dharm
2003-01-25 1:07 ` Doug Ledford
2003-02-02 18:13 ` Matthew Dharm
2003-02-02 20:06 ` Matthew Dharm
2003-02-03 17:17 ` Mike Anderson
2003-02-16 21:18 ` Matthew Dharm
2003-02-17 19:37 ` Mike Anderson
2003-02-17 19:51 ` Patrick Mansfield
2003-02-23 7:48 ` Matthew Dharm
2003-02-26 23:37 ` Mike Anderson
2003-02-27 1:10 ` Matthew Dharm
2003-02-27 6:37 ` Mike Anderson
2003-02-27 19:32 ` Matthew Dharm
2003-03-01 1:41 ` Matthew Dharm
2003-02-02 3:49 ` Matthew Dharm
2003-01-25 1:24 ` Luben Tuikov
2003-01-24 0:15 ` Patrick Mansfield
2003-01-24 8:33 ` David Brownell
2003-01-23 20:41 ` A different look at block device hotswap in the Linux kernel Steven Dake
2003-01-23 21:07 ` Matthew Jacob
2003-01-23 21:06 ` Steven Dake
2003-01-23 21:16 ` Matthew Jacob
2003-01-24 0:07 ` Oliver Neukum
2003-01-24 0:21 ` Matthew Jacob
2003-01-24 7:53 ` David Brownell
2003-01-24 15:26 ` Matthew Jacob
2003-01-24 0:54 ` Steven Dake
2003-01-24 2:35 ` [linux-usb-devel] " Matthew Dharm
2003-01-22 21:30 ` [linux-usb-devel] Re: [PATCH] USB changes for 2.5.58 David Brownell
2003-01-20 22:16 ` Luben Tuikov
2003-01-20 22:51 ` David Brownell
2003-01-20 23:27 ` Oliver Neukum
2003-01-22 12:07 Bennie J. Venter
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=3E2F1213.8090400@splentec.com \
--to=luben@splentec.com \
--cc=andmike@us.ibm.com \
--cc=david-b@pacbell.net \
--cc=greg@kroah.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=mdharm-scsi@one-eyed-alien.net \
--cc=oliver@neukum.name \
--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