[8138] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: [PATCH] scsi reset from user space

daemon@ATHENA.MIT.EDU (Ricky Beam)
Mon Feb 21 11:48:05 2000

Date:   Mon, 21 Feb 2000 11:16:30 -0500 (EST)
From: Ricky Beam <jfbeam@bluetopia.net>
To: linux-scsi@vger.rutgers.edu
In-Reply-To: <38B13E6B.34A4FCA9@compaq.com>
Message-ID: <Pine.LNX.4.04.10002211057030.12259-100000@beaker>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Mon, 21 Feb 2000, Robin T. Miller wrote:
>Kurt Garloff wrote:
>> On Sun, Feb 06, 2000 at 12:49:48PM -0500, Douglas Gilbert wrote:
>> > James Bottomley (James.Bottomley@columbiasc.ncr.com) recently sent
>> > me a patch that enables a scsi reset to be called from the user
>> > space. It uses an ioctl() found in recent sg drivers called
>> > SG_SCSI_RESET that was defined but previously did nothing.
>> 
>> As a sidenote: If you are developing SCSI drivers, you certainly need it. I
>> do at least. That's why I have such a functionality in my drivers since
>> quite a time. I would happily remove it in favour of a generic solution.
>
>	The ability to do SCSI bus/device resets and aborting outstanding I/O
>is invaluable to those of us doing device qualification.  We not only verify
>the device handles them properly, but it forces the driver down error paths
>not normally invoked.

This is indeed an invaluable feature... there are all sorts of reasons to
want to reset a single device or entire bus of an active scsi card.  HOWEVER,
serious care must be taken in allowing this.

Case in point... low-level formating.  A device or bus reset will terminate
a FORMAT UNIT operation.  In some cases, you make an expensive brick doing
that.  In all cases, the format has to complete before the drive can be used.
(Drives that can be interrupted will report no blocks available)

An other sticking point is CD writers... these are both the most deserving
of a reset and the most sensitive to a reset.  Alot of things will cause
them to not work correctly until reset -- including something as simple
as putting a bad CD in it (altho' I've only seen a few Sony drives lockup
like this.)  Likewise, you don't want other applications resetting the
drive while a write is in progress.  And you certainly don't want a bus
reset during write operations (unless the CD's source is the one calling
for a bus reset but you've already lost streaming at that point.)

If userland applications can request target and/or bus resets, then there
needs to be a mechanism for userland applications to request that others
DON'T do these actions.  (This redefines "bloody mess." :-))

--Ricky



-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post