Subject: Re: Question about scsi_select() in atari/mac68k ncr5380.c
To: Jason Thorpe <thorpej@shagadelic.org>
From: Allen Briggs <briggs@netbsd.org>
List: tech-kern
Date: 12/07/2004 15:08:13
--F8dlzb82+Fcn6AgP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Dec 07, 2004 at 11:32:17AM -0800, Jason Thorpe wrote:
[...]
>                 if (!reach_msg_out(sc, sizeof(struct scsi_generic))) {
[...]
>=20
> What is the significance of using the size of a "generic SCSI commmand"=
=20
> here?  Is the intent really to absorb up to exactly 12 bytes?

It's to absorb at most that many data bytes (in or out).  In this
case, it's outbound bytes during a device selection.  I think the
intent is that in this error path, a device might force up to a
full 12-byte command's worth of data to be transferred before
transitioning to a message phase.  It should be safe to use a
larger value here.

The size is basically an upper bound on the time it will wait
for msg out.

-allen

--=20
                  Use NetBSD!  http://www.netbsd.org/

--F8dlzb82+Fcn6AgP
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD8DBQFBtg2ttbG21IdtLQIRAiinAJ0ZB+ufr1HvTFQUUIgoZKNQMlh1tQCg6ktD
iMJAgUGNVIhP/SjOlklVdWc=
=W+27
-----END PGP SIGNATURE-----

--F8dlzb82+Fcn6AgP--