>Normally, I'd just go allocating my own buffer for this... but it occurs to
>me that there has been much talk of changing the MAX_COMMAND_SIZE from 12
>to 16 to support SCSI-III devices.  A quick grep of drivers/scsi shows that
>MAX_COMMAND_SIZE is only used to allocate arrays and fill them with 0, so
>it _looks_ like just changing the #define in scsi.h to 16 will work
>_just_fine_ with no other code modifications.

    Yes, for 2.4 I *think* I cleaned out all of the places where we had
hardcoded "12" constants, and
replaced them with MAX_COMMAND_SIZE, in preparation for this move.

>The question is this:  Could this actually happen for 2.4.2?  We can solve
>the technical problems, so the only thing to overcome is the "should we be
>changing this in a 2.4.x kernel" question.
>
>There's been discussion in the past, which boiled down to "we'll do it when
>we need it".  And it looks easily doable.  And we need it.
>
>Comments?

    It is a little more than just changing the define.  I believe (and other
people have confirmed) that some of the older host adapters would be unable
to handle the larger command sizes.   The limitations could be
hardware/firmware in some cases.  To be really safe, we probably want to
limit 16-byte commands to host adapters that claim to be ready for them.
Thus I believe that such a change would involve first adding a field for a
maximum command size to the Scsi_Host structure, which gets initialized to
12 by default.

    The mid-layer would then need to reject attempts to queue commands
longer than the established limit.

    Finally, hosts that are prepared to deal with 16-byte commands would
need to change the maximum command length to 16.

    The changes aren't really all that hairy, assuming that I haven't missed
anything.  Anyone else have any comments?

-Eric

----- Original Message -----
From: "Matthew Dharm" <[EMAIL PROTECTED]>
To: "Linux SCSI list" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, February 15, 2001 3:07 PM
Subject: Changing MAX_COMMAND_SIZE within the 2.4.x timeframe?



-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to