>Hrm... are you saying that they couldn't handle the larger buffer, or the
>larger command?
>
>If it's the larger command, that's fine with me. Just don't send that
>command. Just because we have the larger buffer doesn't mean that
>everything will support the larger commands. I hardly expect a SCSI-I
>adapter to respect SCSI-III standards.
Cannot handle the larger command. In particular some of the mailbox
style of host adapters have a bit of memory mapped into which commands are
copied. In such cases, the hardware might say that there are 12 bytes for
the command followed by some number of bytes for sense data (thinking of the
1542 in this instance, but I know there to be others).
>If you're saying the larger buffer... I'm a bit stunned. How is that
>possible? So the array is too long... is someone trying to map
>Scsi_Request data structures directly onto some sort of adapter memory?
Not directly, but there are lots of places where the commands are
memcpyed down to a bit of adapter memory which could inadvertently overwrite
something else. Consider this from the wd7000 driver:
cdblen = SCpnt->cmd_len;
idlun = ((SCpnt->target << 5) & 0xe0) | (SCpnt->lun & 7);
SCpnt->scsi_done = done;
SCpnt->SCp.phase = 1;
scb = alloc_scbs (1);
scb->idlun = idlun;
memcpy (scb->cdb, cdb, cdblen);
This is another example of a mailbox driver that has a hardcoded (and by
hard, I mean *HARD* as in hardware :-) 12 byte limit for commands. If a
16-byte command were to slip through, the memcpy would overwrite something
else in memory.
My preference is that 16-byte commands not even reach low-level drivers
that are not prepared to deal with them. It would be a little more work to
get it set up, but on the whole it would be safer, esp if we are considering
this for 2.4.
A cleaner solution would probably be to patch each and every driver to
reject SCSI-III commands, and then remove the patch for drivers that are
known to accept 16-byte commands. Yech - the low-level driver count is now
hovering around 80.
Also keep in mind that we as of yet have no record in the Scsi_Host
structure to say whether a host is SCSI-III or not.
-Eric
--
----- Original Message -----
From: "Matthew Dharm" <[EMAIL PROTECTED]>
To: "Eric Youngdale" <[EMAIL PROTECTED]>
Cc: "Linux SCSI list" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, February 15, 2001 4:13 PM
Subject: Re: 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]