[8686] in linux-scsi channel archive
Re: sc_data_direction -- will we require it?
daemon@ATHENA.MIT.EDU (Matthew Dharm)
Thu Apr 20 03:12:02 2000
Date: Thu, 20 Apr 2000 00:01:52 -0700 (PDT)
From: Matthew Dharm <mdharm-scsi@one-eyed-alien.net>
To: Douglas Gilbert <dgilbert@interlog.com>
Cc: Eric Youngdale <eric@andante.org>, linux-scsi@vger.rutgers.edu,
xiphmont@xiph.org
In-Reply-To: <38FE814D.ED7F0333@interlog.com>
Message-ID: <Pine.LNX.4.10.10004192354440.5726-100000@ziggy.one-eyed-alien.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Thu, 20 Apr 2000, Douglas Gilbert wrote:
> Forcing the issue on the data direction flag (the effected
> application authors know where to find me :-) ) may well
> help us in the medium to long run.
I agree here. I think we have to force the issue to get applications
to make the change.
> As Gerard pointed out, the reward for getting the data direction wrong
> is possibly a SCSI bus reset rather than a crash (in his drivers). Still
> if that SCSI bus holds a disk with the root file system this is
> discomforting, especially if there are retries.
I agree that this is discomforting, but I think it may be the only way.
And the fact that we maintain functionality is an important thing -- I'm a
strong believer in the "recover from errors and go on whenever possible"
theory of design.
> Perhaps I did not fully understand Matthew concerning the USB mass storage
> driver, but it sounded like the USB architecture could not handle the
> UNKNOWN data direction. Or is that an overstatement?
It's a slight overstatement. Let me put it this way: The USB Mass
Storage driver _must_ know from somewhere which way the data transfer is
going to be. Right now, it has its own internal table. I don't like this
approach because I cannot verify that this table is accurate, nor can I
handle vendor-specific commands. Thus, I would like to use the
sc_data_direction flag. However, if I use this flag, then I cannot handle
the UNKNOWN condition.
So yes, the USB Mass Storage driver would not be able to handle a command
where sc_data_direction is UNKNOWN. It would reject that command,
probably setting result to DID_ERROR<<16. I haven't implemented the
behavior to rely on the sc_data_direction flag yet. I'm still waiting for
this discussion to come to a conclusion before I do so.
At the very least, I think Alan Cox's idea of consolidating all the
various driver-level tables into a mid-level table is a good start.
Secondarily, we need to force the issue with application developers to
_make_ them set the flag.
Matt Dharm
--
Matthew Dharm Home: mdharm@one-eyed-alien.net
Engineer, Qualcomm, Inc. Work: mdharm@qualcomm.com
Oh great modem, why hast thou forsaken me?
-- Dust Puppy
User Friendly, 3/2/1998
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu