Review of CAM Clause 11 (Target Mode Operation)

Ralph Weber -- VMS -- ZKO3-4/U14 weber at star.enet.dec.com
Mon Feb 14 10:27:45 PST 1994


I have reviewed the new CAM Clause 11 (Target Mode Operation) distributed
by Bill Dallas on 10 December 1993.  I have several comments on Clause 11,
both technical and editorial.  I will identify the text that I am comment-
ing about using clause and paragraph pointers.  I will not use page numbers
because they may depend on the CAM draft that one is using as their
reference.  Each of my comments will be formatted as follows:

  {comment#}{T|E Technical/Editorial}{Clause identification}---------------
  {Original text}
  The text about which I am commenting

  {Comments}
  My comments and proposed corrections.

There are about 100 comments here.  Of that, 26 are technical comments. 
The rest are editorial.  The most serious technical comment is number 79. 
I am not sure how to fix the problem identified by comment 79.

Thank you for considering these comments.

Ralph O. Weber
OpenVMS
Digital Equipment Corp.
__________________________________________________________________________

{001}{E}{11 P5 S2}---------------------------------------------------------
{Original text}
In this mode, when the adapter is selected and the XPT/SIM receives an
Identify message for a LUN that has registered as a Host Target LUN. 

{Comments}
This is not a sentence.  It might be an introductory phrase for the next
sentence.  If the period were changed to a comma, the resulting sentence
would read:

In this mode, when the adapter is selected and the XPT/SIM receives an
Identify message for a LUN that has registered as a Host Target LUN, the
SIM/HBA may accept any target mode command, based on conditions specified
in this document.  


{002}{E}{11 P6 S4}---------------------------------------------------------
{Original text}
An example of this is the synchronous data transfer message.

{Comments}
There is no synchronous data transfer message.  The message is the
synchronous data transfer request message.  The sentence should be
corrected to read:

An example of this is the synchronous data transfer request message.


{003}{E}{11 P6 2nd to the last sentence}-----------------------------------
{Original text}
On receipt of a supported target message that is not handled transparently,
the SIM/HBA shall immediately notify the Host Target Mode peripheral driver
by the mechanisms provided by the IMMEDIATE NOTIFY CCB. 
{Comments}
"By" is used incorrectly in the phrase, "by the mechanisms".  A better word
would be "using."  The corrected sentence would read:

On receipt of a supported target message that is not handled transparently,
the SIM/HBA shall immediately notify the Host Target Mode peripheral driver
using the mechanisms provided by the IMMEDIATE NOTIFY CCB. 


{004}{E}{11 P7 S1}---------------------------------------------------------
{Original text}
In summary, Host Target Mode peripheral drivers can be called back multiple
times for a command received by the SIM/HBA, once for each command required
and an additional number depending on the command and host the Host Target
Mode peripheral driver has been implemented.

{Comments}
The phrase, "and host the Host Target Mode peripheral driver has been
implemented" makes no sense.  The first "host" should be changed to "how." 
The corrected sentence would read:

In summary, Host Target Mode peripheral drivers can be called back multiple
times for a command received by the SIM/HBA, once for each command required
and an additional number depending on the command and how the Host Target
Mode peripheral driver has been implemented.


{005}{T}{11 P9}------------------------------------------------------------
{No original text present}
{Comments}
My reading of the Phase Cognizant description in clause 11.1 and in the
last two paragraphs of clause 11 suggests that Phase Cognizant mode does
NOT support tagged command queuing.  I believe that a note to this effect
is required in the summary paragraph describing Phase Cognizant operation.


{006}{E}{11.2 P1 S2}-------------------------------------------------------
{Original text}
The specified LUN is the one enabled for selection, and if the HBA is to
respond as an additional LUN, another Enable LUN is required.

{Comments}
Please breakup this run-on sentence.  The corrected text would read:

The specified LUN is the one enabled for selection.  If the HBA is to
respond as an additional LUN, another Enable LUN is required.


{007}{T}{11.2 P5 S2}-------------------------------------------------------
{Original text}
While the request is being held, the CAM Status field of the Target CCB,
shall be set to Request in Progress. 

{Comments}
The phrase "while the request is being held" is unclear in several ways. 
What is "the request?"  What does "being held" mean?  I believe that the
correct answers to these questions are as follows.  The "request" is the
ENABLE LUN CCB.  "Being held" is equivalent to the LUN being enabled for
Phase Cognizant mode operation.  If both of my guesses are correct, then
the sentence should be clarified to read as shown at the end of this
comment.

The phrase "the CAM Status field of the Target CCB," has two problems. 
First, there can be more than one Target CCB.  So, the sentence's inference
that the one Target CCB is affected is wrong.  Second, the comma at the end
of the phrase is inappropriate.

If all the above comments are corrected, the sentence should read:

While the LUN is enabled for Phase Cognizant mode operation, the CAM Status
field of each Target CCB shall be set to Request in Progress.


{008}{E}{11.2 P7 Bullet3}--------------------------------------------------
{Original text}
- CAM Flags shall set the Target CCB Available as needed 

{Comments}
There probably is a missing "be".  Certainly, I don't see how the CAM Flags
can be an active agent in an English sentence.

I believe that the corrected bullet should read:

- CAM Flags shall be set the Target CCB Available as needed 


{009}{T}{11.2 P9}----------------------------------------------------------
{No original text present}
{Comments}
I believe that several items have been omitted from the list of things that
must be setup in the Target CCBs delivered as part of the Phase Cognizant
mode ENABLE LUN CCB.  If I am correct, then each of these points should be
added to the existing bulleted list.

I believe that the CCB Available CAM Flag must be set.  This is necessary
to make the scanning algorithm described in paragraph 7 of Clause 11.2.1
work.

I believe that the Timeout Value field must be set to infinity.  This is
suggested by the statement in the last paragraph of Clause 11.2.1.


{010}{E}{11.2 P9 Bullet1}--------------------------------------------------
{Original text}
- CAM Flag information including AutoDisconnect and AutoSave.

{Comments}
The field is "CAM Flags" not "CAM Flag."  The sentence should be corrected
to read:

- CAM Flags information including AutoDisconnect and AutoSave.


{011}{T}{11.2 P9 Bullet3}--------------------------------------------------
{Original text}
- The Group 6 and 7 Vendor Unique CDB Length fields contain the number
of bytes a target application expects to receive for the  vendor unique
command set. The previous item shall go hand-in-hand with this requirement.
The Group 6 and 7 Vendor Unique CDB Length fields shall be retained for
each LUN enabled. 

{Comments}
I do not see how this information is important in each Target CCB.  This
important copy of this information should be in the ENABLE LUN CCB.  So,
putting copies of this data in each Target CCB is a mistake.  It should be
removed.


{012}{T}{11.2 P12 S1}------------------------------------------------------
{Original text}
If a LUN is disabled, after having been enabled, then the Inquiry data and
the Vendor Unique CDB Length data shall be cleared.

{Comments}
Nothing up to this point in the clause describes where the Inquiry data
mentioned in the sentence above came from.  Also, nothing says who is
maintaining this Inquiry data, but I suspect that it is the SIM/HBA. 
I don't quite know what to fix.  The easiest thing would be deleting this
paragraph, but adding a better description of the Inquiry data would be a
better choice.


{014}{E}{11.2 P14 S1}------------------------------------------------------
{Original text}
This function shall return non-zero CAM Status: 

{Comments}
Which function?  How about clarifying this sentence to read:

The Enable LUN function shall return non-zero CAM Status: 


{015}{E}{11.2 P15 Bullet6}-------------------------------------------------
{Original text}
- CAM Status of Function Not Implemented indicates that Target Mode is not
supported by this implementation of CAM. 

{Comments}
This bullet needs an upgrade based on the addition of Host Target Mode
operation.  Change the bullet to read:

- CAM Status of Function Not Implemented indicates that Phase Cognizant
Target Mode is not supported by this implementation of CAM. 


{016}{E}{11.2.1 P1 S2}-----------------------------------------------------
{Original text}
The XPT/SIM response to these messages shall be as defined in X3.131-1991.

{Comments}
The specification number for SCSI-2 should be in only one place in the
standard.  It should be in the Normative References clause.  Change this
sentence to use SCSI-2.  It should read:

The XPT/SIM response to these messages shall be as defined in SCSI-2.


{017}{E}{11.2.1 P7 S2}-----------------------------------------------------
{Original text}
If none of them have the Target CCB Available bit set, the XPT/SIM shall
request the SCSI CDB and post BSY status.

{Comments}
I think that requesting the CDB and posting a BUSY status are odd bed-
fellows.  I think that the CDB should be rejected, not requested.  Also,
the correct SCSI-2 status name is BUSY not BSY.  Applying these two
corrections, the sentence will read:

If none of them have the Target CCB Available bit set, the XPT/SIM shall
reject the SCSI CDB and post BUSY status.


{018}{E}{11.2.1 P9 S1}-----------------------------------------------------
{Original text}
If a target application sets Target Available upon recognizing that a CDB
has been received and uses a different CCB to perform the data transfer,
there is a lower likelihood of a BSY response to the initiator when a CCB
is not available.

{Comments}
The correct SCSI-2 status name is BUSY not BSY.  The corrected sentence
should read:

If a target application sets Target Available upon recognizing that a CDB
has been received and uses a different CCB to perform the data transfer,
there is a lower likelihood of a BUSY response to the initiator when a CCB
is not available.


{019}{E}{11.2.1 P14 S1}----------------------------------------------------
{Original text}
If the Group Code of the Operation Code of the Command Block is Vendor
Unique the XPT/SIM shall ensure that only the indicated number of command
bytes are received.

{Comments}
The structure is the Command Data Block (CDB), not the Command Block.  The
sentence should be corrected to read:

If the Group Code of the Operation Code of the CDB is Vendor Unique the
XPT/SIM shall ensure that only the indicated number of command bytes are
received.


{020}{T}{11.2.1 P14}-------------------------------------------------------
{Original text, as revised by comment above}
If the Group Code of the Operation Code of the CDB is Vendor Unique the
XPT/SIM shall ensure that only the indicated number of command bytes are
received. If the required number of bytes are exceeded or not transferred,
then the XPT/SIM shall return a status of Check Condition, the Sense Key in
the Sense Buffer shall be set to Illegal Request, and the Additional Sense
Key and Qualifier shall be set to Command Phase Error.

{Comments}
The entire concept embodied in this paragraph is in conflict with SCSI
target mode operation.  As the target, the XPT/SIM defines exactly how
many CDB bytes are moved.  The XPT/SIM changes the bus into command phase. 
It accepts however many bytes it wants.  Then, it changes the bus out of
command phase.  Under these rules of operation, the phase cognizant target
mode XPT/SIM cannot know whether the initiator tries to send fewer or more
CDB bytes than it expects.

I will propose the following replacement paragraph:

If the Group Code of the Operation Code of the CDB is Vendor Unique, the
XPT/SIM shall transfer the number of CDB bytes shown in the ENABLE LUN CCB
for this LUN.  The Group Code in the incoming CDB (either 6 or 7) shall
select the Vendor Unique CDB size from the ENABLE LUN CCB.  If the selected
CDB size (in the ENABLE LUN CCB) is zero, the XPT/SIM shall only transfer
the CDB Operation Code.


{021}{E}{11.2.1 P15 S2}----------------------------------------------------
{Original text}
The subsequent invocation of the Execute Target I/O function shall perform
an automatic reselect when it is invoked.

{Comments}
This sentence is direct from our Department of Redundancy Department.  Drop
the "when it is invoked" so that the sentence reads:

The subsequent invocation of the Execute Target I/O function shall perform
an automatic reselect.


{022}{T}{11.2.2 P2&P5 S1}--------------------------------------------------
{Original text}
If the Status Valid bit is set, the XPT shall send the status byte
specified in the SCSI Status field to the current initiator and then
send the Command Complete Message.

The XPT/SIM shall be able to execute all the phases indicated by the Buffer
Valid bits of the CAM Flags, within a single invocation of the Execute
Target I/O i.e. if more than one bit is set, the order of execution of the
phases shall be data, status, and message.

{Comments}
I realize that the sending a COMMAND COMPLETE message after sending SCSI
Status is a significant convenience feature.  However, I think it dilutes
the usefulness of Phase Cognizant mode.

First, the phase cognizant peripheral driver cannot set both the Status
Valid and Message Valid bits.  If Status Valid is set, the COMMAND COMPLETE
message is going to terminate the I_T_L_x nexus.  So, sending any more
message bytes after that is nonsense.

Second, this construct prohibits peripheral drivers from implementing
linked commands in phase cognizant mode.  Linked commands require messages
other than COMMAND COMPLETE after the SCSI Status, particularly LINKED
COMMAND COMPLETE or LINKED COMMAND COMPLETE (WITH FLAG).  So sending
COMMAND COMPLETE after the status phase is wrong for linked commands.

Therefore, I propose that the standard be changed to just send the status
byte when Status Valid is set.  I recognize that this will force phase
cognizant peripheral drivers to set both Status Valid and Message Valid
and provide a COMMAND COMPLETE message byte.  But, it a more technically
correct standards definition.


{023}{T}{11.2.3 Table 22}--------------------------------------------------
{Original text}
Number of Scatter/Gather Entries in the EXECUTE TARGET I/O CCB.

{Comments}
I do not understand why we do NOT use the number of scatter/gather entries
field in the EXECUTE TARGET I/O CCB.  Surely, this field is needed to
describe any data that might be transferred in a data in or out phase.

The Dir column should contain an O for the Number of Scatter/Gather Entries
field.


{024}{E}{11.3.2 P1 S6}----------------------------------------------------
{Original text}
For notification message handling the SIM/HBA will also need to maintain
certain state information about the message, but how that is accomplished
is left to the discretion of the SIM/HBA implementer.

{Comments}
There is a requirement in this sentence that is not identified with the
magic word, "shall."  Change the sentence to read:

For notification message handling the SIM/HBA shall maintain certain state
information about the message, but how that is accomplished is left to the
discretion of the SIM/HBA implementer.


{025}{E}{11.3.3 P2 S2}-----------------------------------------------------
{Original text}
The IMMEDIATE NOTIFY CCB contains a unique sequence identifier for a Host
Target Mode LUN.

{Comments}
There is a requirement in this sentence that is not identified with the
magic word, "shall."  Change the sentence to read:

The IMMEDIATE NOTIFY CCB shall contain a unique sequence identifier for a
Host Target Mode LUN.


{026}{E}{11.3.3 P3 BulletA}------------------------------------------------
{Original text}
Any processing needed to comply with this specification and the SCSI 2
specification.

{Comments}
It's "SCSI-2" not "SCSI 2".  Change the sentence to read:

Any processing needed to comply with this specification and the SCSI-2
specification.


{027}{E}{11.3.3 P3 BulletB}------------------------------------------------
{Original text}
Issue a NOTIFY ACKNOWLEDGE CCB with the Sequence Identifier field set to
the value from Sequence Identifier field of the IMMEDIATE NOTIFY CCB for
this event/message.

{Comments}
The phrase "this event/message" is not specific.  Change the sentence to
read:

Issue a NOTIFY ACKNOWLEDGE CCB with the Sequence Identifier field set to
the value from Sequence Identifier field of the IMMEDIATE NOTIFY CCB for
the event/message being processed.


{028}{E}{11.3.3 P4 S1}-----------------------------------------------------
{Original text}
It is a requirement that there is a one for one correspondence between the
Immediate Notify and the Notify Acknowledgement from the Host Target Mode
peripheral driver.

{Comments}
There is a requirement in this sentence that is not identified with the
magic word, "shall."  Change the sentence to read:

There shall be a one for one correspondence between the Immediate Notify
and the Notify Acknowledgement from the Host Target Mode peripheral driver.

{029}{E}{11.3.3 P5 S2}-----------------------------------------------------
{Original text}
There shall not be two sequence identifiers in use at the same time for a
Host Target Mode LUN.

{Comments}
This sentence does not clearly state that concurrent identical sequence
identifiers are prohibited.  Change the sentence to read:

There shall not be two identical sequence identifiers in use at the same
time for a Host Target Mode LUN.


{030}{E}{11.3.3 P2 S3}-----------------------------------------------------
{Original text}
The words "in use" for the sequence identifiers shall mean from peripheral
driver callback to Notify Acknowledgement from the peripheral driver.

{Comments}
The time aspect of this statement is not clearly spelled out.  Change the
sentence to read:

The words "in use" for the sequence identifiers shall mean the time from
peripheral driver callback to Notify Acknowledgement from the peripheral
driver.


{031}{E}{11.3.3 P8 S1}-----------------------------------------------------
{Original text}
The order in which the Host Target Mode peripheral driver is notified
and when the SIM/HBA releases the SCSI bus to a Bus Free state is not
specified.

{Comments}
I just want to carve a few words out of this sentence for simplicity. 
Try this:

The ordering Host Target Mode peripheral driver notification and the
SIM/HBA release of the SCSI bus to a Bus Free state is not specified.


{032}{E}{11.3.3 P8 S2}-----------------------------------------------------
{Original text}
The ordering of the Bus Free and callback in Section 11.3.3.1 is to show
the required steps.

{Comments}
Since the purpose is the define away the implied ordering of work in clause
11.3.3.1, I would like to avoid the word "ordering."  Also, we might as
well fix the non-ISO terminology, "section."  How about:

The listing of the Bus Free and callback in clause 11.3.3.1 is to show the
required steps.


{033}{E}{11.3.3 P8}--------------------------------------------------------
{No original text present}
{Comments}
With all of this discussion of how the ordering of listed steps is not
important, I think a sentence about how it is important should be added. 
Add the following sentence at the end of paragraph 8:

In all other cases, the order in which clause 11.3.3.1 lists operations is
the order in which those operations shall be performed.


{034}{E}{11.3.3 P9 S3}-----------------------------------------------------
{Original text}
I.E the the first Extended message argument byte received after the
Extended message code shall be placed into the Message Arguments array[0]
field.

{Comments}
Eliminate the extraneous eight characters at the beginning of this sentence
so that it reads:

The first Extended message argument byte received after the Extended
message code shall be placed into the Message Arguments array[0] field.


{035}{E}{11.3.3 P10 S1&2}--------------------------------------------------
{Original text}
For the SCSI bus ABORT and CLEAR QUEUE messages, the order in which the
CCBs are returned to the Host Target Mode peripheral driver and the
IMMEDIATE NOTIFY CCB callback is done to the driver is specified. The order
shall be as follows:

{Comments}
The messages are SCSI messages, not SCSI bus messages.  So, drop the word
"bus" at the beginning of the first sentence.  The phrase "is specified" is
redundant.  Of course the order is specified.  It's present in the
standard.  Cleanup these two sentences to read:

For the SCSI ABORT and CLEAR QUEUE messages, the order in which the CCBs
are returned to the Host Target Mode peripheral driver and the IMMEDIATE
NOTIFY CCB callback is done to the driver shall be as follows:


{036}{E}{11.3.3.1.1 P1 S2}-------------------------------------------------
{Original text}
These events are specified in the SCSI 2 specification.

{Comments}
It's "SCSI-2" not "SCSI 2".  Change the sentence to read:

These events are specified in the SCSI-2 specification.


{037}{E}{11.3.3.1.2.1 P2 BulletE}------------------------------------------
{Original text}
Set the IMMEDIATE NOTIFY CCB Message Code field to the ABORT Message code
( 06h ).

{Comments}
There should be no hardcoded numeric values in the standards definition. 
(Or, everything that has an associated numeric value should show that value
at every reference site.  I think deleting the existing numeric values is
easier.)  Change the sentence to delete the numeric value and read:

Set the IMMEDIATE NOTIFY CCB Message Code field to the ABORT Message code.


{038}{E}{11.3.3.1.2.1 P2 BulletF}------------------------------------------
{Original text}
Set the CAM status of all CONTINUE TARGET I/O CCBs for this I_T_L nexus
shall have the CAM status set to Request Aborted by Host and shall be
returned to the Host Target Mode peripheral driver by the CONTINUE TARGET
I/O CCB callback mechanism.

{Comments}
This sentence has two verbs.  Deleting the first verb is the easiest fix. 
So, the corrected sentence would read:

The CAM status of all CONTINUE TARGET I/O CCBs for this I_T_L nexus shall
have the CAM status set to Request Aborted by Host and shall be returned
to the Host Target Mode peripheral driver by the CONTINUE TARGET I/O CCB
callback mechanism.


{039}{E}{11.3.3.1.2.1 P2 BulletG}------------------------------------------
{Original text}
Set the CAM status of all CONTINUE TARGET I/O CCBs for this I_T_L nexus
shall have the CAM status set to Request Aborted by Host and shall be
returned to the Host Target Mode peripheral driver by the CONTINUE TARGET
I/O CCB callback  mechanism.

{Comments}
This sentence has two verbs.  Deleting the first verb is the easiest fix. 
So, the corrected sentence would read:

The CAM status of all CONTINUE TARGET I/O CCBs for this I_T_L nexus shall
have the CAM status set to Request Aborted by Host and shall be returned
to the Host Target Mode peripheral driver by the CONTINUE TARGET I/O CCB
callback  mechanism.


{040}{T}{11.3.3.1.2.1 P2 BulletsF&G}---------------------------------------
{Original text, set comments 38 and 39}
{Comments}
Those of you who looked carefully at the previous two comments will notice
that the sentences in both bullets read exactly the same.  I think that
this is a cut&paste problem.  Probably one of the two bullets should cover
ACCEPT TARGET I/O CCBs.  I am not sure if the ordering CONTINUE TARGET I/O
CCB processing is important with respect to processing of ACCEPT TARGET I/O
CCBs.  If my assumption about the cut&paste problem and ACCEPT TARGET I/O
is incorrect, then one of the two bullets should be deleted.


{041}{E}{11.3.3.1.3 P1 S1}-------------------------------------------------
{Original text}
Optional messages that are handled by the SIM/HBA with or without
notification to the corresponding Host Target Mode peripheral driver.

{Comments}
This is not a sentence.  The following change makes it a sentence:

This clause describes optional messages that are handled by the SIM/HBA
with or without notification to the corresponding Host Target Mode
peripheral driver.


{042}{T}{11.3.3.1.3.2 P1}--------------------------------------------------
{No original text present}
{Comments}
Based on the first sentence of clause 11.3.3.1.3.3, I believe that the
following sentence must be added to the beginning of clause 11.3.3.1.3.2:

The ABORT TAG message shall be supported if Tagged Queue Operation is
supported.


{043}{E}{11.3.3.1.3.2 P2 BulletD}------------------------------------------
{Original text}
Set the IMMEDIATE NOTIFY CCB Message Code field to the ABORT TAG Message
code ( 0Dh ).

{Comments}
Do not include numeric values in the standards text.  Change this sentence
to read:

Set the IMMEDIATE NOTIFY CCB Message Code field to the ABORT TAG Message
code.


{044}{E}{11.3.3.1.3.3 P1 S1}-----------------------------------------------
{Original text}
The CLEAR QUEUE message shall be supported if Tagged Queue Operation.

{Comments}
The "if" clause is incomplete.  If Tagged Queue Operation what?  Correct
this sentence to read:

The CLEAR QUEUE message shall be supported if Tagged Queue Operation is
supported.


{045}{E}{11.3.3.1.3.3 P2 BulletD}------------------------------------------
{Original text}
Set the IMMEDIATE NOTIFY CCB Message Code field to the  CLEAR QUEUE Message
code ( 0Eh ).

{Comments}
Do not include numeric values in the standards text.  Change this sentence
to read:

Set the IMMEDIATE NOTIFY CCB Message Code field to the  CLEAR QUEUE Message
code.


{046}{E}{11.3.3.1.3.3 P2 BulletF}------------------------------------------
{Original text}
All CONTINUE TARGET I/O CCBs that the SIM/HBA owns for this LUN, shall have
the CAM status set to Request Aborted by Host and shall be returned to the
Host Target Mode peripheral driver by the CONTINUE TARGET I/O CCB callback
mechanism.Refer to the SCSI 2 specification Section 5.6.4 for any further
clarification.

{Comments}
First, clean this mess up by adding a space (or two) after the period that
ends the first sentence.  Second, it's "SCSI-2" not "SCSI 2".  You might as
well change "section" to "clause" too.  Change the sentences to read:

All CONTINUE TARGET I/O CCBs that the SIM/HBA owns for this LUN, shall have
the CAM status set to Request Aborted by Host and shall be returned to the
Host Target Mode peripheral driver by the CONTINUE TARGET I/O CCB callback
mechanism.  Refer to the SCSI-2 specification Clause 5.6.4 for any further
clarification.


{047}{E}{11.3.3.1.3.4 P1 S1}-----------------------------------------------
{Original text}
The handling of these messages are described in detail in Section 11.3.8.

{Comments}
The word "messages" is the object preposition "of".  As such, it cannot be
the subject of the sentence and has no effect of the verb "are".  The word
"handling" is the subject of the sentence and forces the verb to be
singular (is), not the plural (are).  Also change the word "Section" to
"Clause", because this is an ISO document.  Thus, the sentence should read:

The handling of these messages is described in detail in Clause 11.3.8.


{048}{E}{11.3.3.1.3.5 P1 S1}-----------------------------------------------
{Original text}
When the supported CLEAR QUEUE message is received for an enabled Host
Target Mode LUN by the SIM/HBA, the SIM/HBA shall:

{Comments}
Heading for this clause is "Terminate I/O Process message."  So, I think
this sentence contains a cut&paste error.  The sentence should read:

When the supported TERMINATE I/O PROCESS message is received for an enabled
Host Target Mode LUN by the SIM/HBA, the SIM/HBA shall:


{049}{E}{11.3.3.1.3.5 P2 BulletG}------------------------------------------
{Original text}
Set the IMMEDIATE NOTIFY CCB Message Code field to the TERMINATE I/O
PROCESS Message code (11h).

{Comments}
Do not include numeric values in the standards text.  Change this sentence
to read:

Set the IMMEDIATE NOTIFY CCB Message Code field to the TERMINATE I/O
PROCESS Message code.


{050}{E}{11.3.3.1.3.5 P2 BulletJ}------------------------------------------
{Original text}
If the Host Target Mode peripheral driver has other CONTINUE TARGET I/O
CCBs associated with this terminated I/O process, the Host Target Mode
peripheral driver shall issue an ABORT CCB for each one.

{Comments}
The list in which this bullet appears is headed by, "the SIM/HBA shall:" 
Yet, the work that this bullet describes is required from the peripheral
driver, not from the SIM/HBA.  It is unwise to bury a required peripheral
driver function in the middle of a SIM/HBA action list.  Developers will
miss it.

This list, and several others like it, have a similar problem.  Specifical-
ly, the last bullet in the list places Contingent Allegiance handling
requirements on the peripheral driver.  Somehow, I find the Contingent
Allegiance statement less egregious, both because it implies something
that the SIM/HBA does not do and because it ends the list.

I propose two remedies for this problem.  The current bullet J can be
combined with the current bullet N (thus moving it to the end of the list). 
Alternatively, bullets J and N can be moved to a new paragraph that is
headed by the words, "the peripheral driver shall:"


{051}{E}{11.3.3.1.3.5 P2 BulletM}------------------------------------------
{Original text}
All ACCEPT TARGET I/O and CONTINUE TARGET I/O CCBs received by the SIM/HBA
for this LUN until         all events are acknowledged by the Host Target
Mode Peripheral driver shall be rejected with:

{Comments}
The left margin alignment for this bullet is wrong.  Also there is a pile
of unnecessary white-space between the words "until" and "all".


{052}{E}{11.3.3.1.4 P2 BulletD}--------------------------------------------
{Original text}
The exact order of these two operations is specified.

{Comments}
I am not sure which of the two possible errors apply to this sentence. 
There may be a requirement in this sentence that is not identified with
the magic word, "shall."  Or, this sentence may be missing the magic word,
"not."  Correct this sentence to read in one of the two ways below,
depending on its intended meaning:

The exact order of these two operations is not specified.

These operations shall be performed in the order shown here.


{053}{E}{11.3.4 Table23}---------------------------------------------------
{Comments}
The Dir-column I for the Message Arguments field is misaligned.


{054}{T}{11.3.4 P4}--------------------------------------------------------
{No original text present}
{Comments}
There is a CAM Status value that the SIM/HBA can pass to the Host Target
Mode peripheral driver that is not listed.  That status is Unavailable
Resource.


{055}{E}{11.3.4 P6}--------------------------------------------------------
{Original text}
The Sense Buffer Length field shall be the length of the sense buffer.

{Comments}
Make this paragraph read:

The Sense Buffer Length field shall be the length of the sense buffer. 
The length shall be at least 18.


{056}{E}{11.3.6 P3 BulletD3 editors note}----------------------------------
{Original text}
The Send Status Bit is for CONTINUE I/O CCBs only. Also you must specify
whether this is Host Target Mode or Phase Cognizant Mode in the ENABLE LUN.

{Comments}
I think that this refers to the ENABLE LUN CCB.  Change the sentence to
read:

The Send Status Bit is for CONTINUE I/O CCBs only. Also you must specify
whether this is Host Target Mode or Phase Cognizant Mode in the ENABLE LUN
CCB.


{057}{E}{11.3.6 P3 BulletD4d}----------------------------------------------
{Original text}
The pointer to the sense buffer, and length.

{Comments}
This is not a sentence.  Change it to read:

The pointer to the sense buffer, and length of the sense buffer shall be
set.


{058}{E}{11.3.6 P3 BulletD5e}----------------------------------------------
{Original text}
The pointer to the sense buffer, and length.

{Comments}
This is not a sentence.  Change it to read:

The pointer to the sense buffer, and length of the sense buffer shall be
set.


{059}{E}{11.3.6 P5 BulletD&E}----------------------------------------------
{Original text}
D) The SIM/HBA shall check that the ENABLE LUN CCB Target CCB pointer field
is non NULL and for each ACCEPT TARGET I/O CCB in the list the  CDB
completion function is set. If either the ENABLE LUN CCB or an ACCEPT
TARGET I/O CCB is found to be in error, then the ENABLE LUN CCB shall fail
with Request Completed With Error.

E) The SIM/HBA shall check that the pointer to the sense buffer is non NULL
and length of the sense buffer is a minimum of 18 bytes for each ACCEPT
TARGET I/O CCB.

{Comments}
I would like the immediate notify and accept target i/o setup bullets to
read the same way.  Also, I like the immediate notify wording better.  So,
replace the above text with:

D) The SIM/HBA shall check that the ENABLE LUN CCB Target CCB pointer field
is non NULL and for each ACCEPT TARGET I/O CCB in the list, the Accept
Target I/O CCB notify callback field is set. The SIM/HBA shall check that
the pointer to the sense buffer is non NULL and length of the sense buffer
is a minimum of 18 bytes for each ACCEPT TARGET I/O CCB. If either the
ENABLE LUN CCB or the ACCEPT TARGET I/O CCB is found to be in error, then
the ENABLE LUN CCB shall fail with Request Completed With Error.


{060}{T}{11.3.6 P5 BulletH}------------------------------------------------
{Original text}
If preceding checks complete without error, the CAM status of the ENABLE
LUN CCB shall be set to Request Completed and the CCB returned.

{Comments}
I may not know what I am talking about on this one.  But, if I am right,
this is a big issue.

If the ENABLE LUN CCB is returned when the request is completed, then the
SIM can no longer use the ENABLE LUN CCB private area or reference the
group 6 & 7 CDB size values found in the ENABLE LUN CCB.  Is returning the
CCB the right thing to do?


{061}{E}{11.3.7 P3 LastBullet}---------------------------------------------
{Original text}
- For ENABLE LUN CCB with a list count of zero (DISABLE LUN) see section
11.3.11. 

{Comments}
This bullet is not lined up with the other "-" bullets in the list. 
Neither is it aligned with the lettered bullets.  Align it correctly.


{062}{T}{11.3.7 P5 LastBullet}---------------------------------------------
{Original text}
- Disconnects Mandatory - Indicates to the SIM/HBA that the peripheral
driver requires that any initiator which sends a CDB to the enabled LUN
shall grant the disconnect privilege.

{Comments}
This is an obtuse way of stating what the SIM/HBA must expect and/or do. 
I propose the following rewrite of this bullet:

- Disconnects Mandatory - Indicates to the SIM/HBA that any Identify
message received must have the DiscPriv bit set.  Clause 11.3.8.2 describes
the SIM/HBA response if the DiscPriv bit is not set when the Disconnects
Mandatory CAM Flag indicates that it must be.


{063}{E}{11.3.8 P2 BulletE}------------------------------------------------
{Original text}
E) Otherwise the xpt_action() return status shall be Request Inprogress.

{Comments}
The spelling and capitalization of "request in progress" differs from that
found in the rest of the document.  Change this bullet to read:

E) Otherwise the xpt_action() return status shall be Request in Progress.



{064}{E}{11.3.8.2 P2 BulletB}----------------------------------------------
{Original text}
The SIM/HBA shall notify the Host Target Mode peripheral driver of this
event by the Immediate Notify mechanism described in Section 11.3.3.

{Comments}
Change the word "Section" to "Clause", because this is an ISO document. 
Thus, the sentence should read:

The SIM/HBA shall notify the Host Target Mode peripheral driver of this
event by the Immediate Notify mechanism described in Clause 11.3.3.


{065}{E}{11.3.8.2 P2 BulletC5}---------------------------------------------
{Original text}
5) The Target ID of the initiator that selected this SIM/HBA in the
Initiator ID field.

{Comments}
This bullet is not aligned with the bullets 1 through 4 in the list.  Also,
the "target ID of the initiator" is a twisted concept.  How about changing
the bullet to read:

5) The SCSI Bus ID of the initiator that selected this SIM/HBA in the
Initiator ID field.


{066}{E}{11.3.8.2 P2 BulletD}----------------------------------------------
{Original text}
D) Set the CAM status to CDB Received.

{Comments}
There is a requirement in this bullet that is not identified with the magic
word, "shall."  Change the bullet to read:

D) The CAM status shall be set to CDB Received.


{067}{E}{11.3.8.2 P2 BulletE1}---------------------------------------------
{Original text}
If the peripheral driver does not support tagged commands then the SIM/HBA
shall reject the QUEUE TAG message and continue as specified in SCSI 2
Section 5.6.14 (Message Reject).

{Comments}
It's "SCSI-2" not "SCSI 2".  Also change the word "Section" to "Clause",
because this is an ISO document.  Change the sentence to read:

If the peripheral driver does not support tagged commands then the SIM/HBA
shall reject the QUEUE TAG message and continue as specified in SCSI-2
Clause 5.6.14 (Message Reject).


{068}{T}{11.3.8.2 P2 BulletG}----------------------------------------------
{Original text}
G) Call the peripheral driver CDB received callback function which was
already set in the ACCEPT TARGET I/O CCB.

{Comments}
There is no "CDB received callback" field in the ACCEPT TARGET I/O CCB. 
The applicable field is "Callback on Completion."  I propose that this
bullet be changed to better reflect the ACCEPT TARGET I/O CCB field names. 
Also, the phrase "which was already set" is wordy.  It can be shortened to
"provided."  The revised bullet would read:

G) Call the peripheral driver CDB completion callback function provided in
the ACCEPT TARGET I/O CCB.


{069}{T}{11.3.8.3 Header}--------------------------------------------------
{Original text}
11.3.8.3 Host Peripheral Driver CDB Received Callback

{Comments}
There is no "CDB received callback" field in the ACCEPT TARGET I/O CCB. 
The applicable field is "Callback on Completion."  I propose that this
bullet be changed to better reflect the ACCEPT TARGET I/O CCB field names. 
The revised header would read:

11.3.8.3 Host Peripheral Driver CDB Completion Callback


{070}{T}{11.3.8.3 P1 S1}---------------------------------------------------
{Original text}
When the peripheral driver's CDB received callback function is called,  it
shall do the following:

{Comments}
There is no "CDB received callback" field in the ACCEPT TARGET I/O CCB. 
The applicable field is "Callback on Completion."  I propose that this
bullet be changed to better reflect the ACCEPT TARGET I/O CCB field names. 
The revised sentence would read:

When the peripheral driver's CDB completion callback function is called, 
it shall do the following:


{071}{T}{11.3.8.3 P2 BulletB}----------------------------------------------
{Original text}
B) If a CHECK CONDITION SCSI status is to be returned to the initiator,
then the Host Target Mode peripheral driver shall setup for the CONTINGENT
ALLEGIANCE condition.

{Comments}
Setting up the CONTINGENT ALLEGIANCE condition is only part of the
peripheral driver's responsibility.  Properly maintaining the CONTINGENT
ALLEGIANCE condition is an equal or more important responsibility. 
Therefore, I propose adding "and maintain" to this bullet.  The modified
bullet would read:

B) If a CHECK CONDITION SCSI status is to be returned to the initiator,
then the Host Target Mode peripheral driver shall setup and maintain the
CONTINGENT ALLEGIANCE condition.


{071}{E}{11.3.8.5 P2 BulletA}----------------------------------------------
{Original text}
A) If the CAM status is not Request Complete Without Error, then an error
has occurred. The Host Target Mode  peripheral driver shall be responsible
for maintaining and if applicable forming sense data.  The sense data
conditions are defined in the SCSI 2 specification. The Host Target Mode
peripheral driver also shall be responsible for maintaining the CONTINGENT
ALLEGIANCE condition associated with the SENSE DATA.

{Comments}
It's "SCSI-2" not "SCSI 2".  Also, I can see no reason for making "SENSE
DATA" all caps.  The bullet should read:

A) If the CAM status is not Request Complete Without Error, then an error
has occurred. The Host Target Mode  peripheral driver shall be responsible
for maintaining and if applicable forming sense data.  The sense data
conditions are defined in the SCSI-2 specification. The Host Target Mode
peripheral driver also shall be responsible for maintaining the CONTINGENT
ALLEGIANCE condition associated with the sense data.


{072}{E}{11.3.8.6 P2 S1}---------------------------------------------------
{Original text}
Editors Note: Additional information can be found in the SCSI 2
specification Section 5.1.1 BUS FREE.

{Comments}
It's "SCSI-2" not "SCSI 2".  Also change the word "Section" to "Clause",
because this is an ISO document.  Change the sentence to read:

Editors Note: Additional information can be found in the SCSI-2
specification Clause 5.1.1 BUS FREE.


{073}{E}{11.3.8.6 P3 BulletD2}---------------------------------------------
{Original text}
2) Cause an unexpected bus free.  Section 5.1.1 SCSI 2 specification.

{Comments}
The second sentence in the bullet has no verb.  Also, it's "SCSI-2" not
"SCSI 2".  Also change the word "Section" to "Clause", because this is an
ISO document.  Change the bullet to read:

2) Cause an unexpected bus free.  See Clause 5.1.1 in the SCSI-2
specification.



{074}{E}{11.3.8.6 P3 BulletF}----------------------------------------------
{Original text}
F) It is the responsibility of the Host Target peripheral driver to
preserve Contingent Allegiance. . . .

{Comments}
There is a requirement in this sentence that is not identified with the
magic word, "shall."  Change the sentence to read:

F) The Host Target peripheral driver shall preserve the Contingent
Allegiance condition. . . .


{075}{T}{11.3.8.6 P5 BulletC}----------------------------------------------
{No original text present}
{Comments}
Why is the Tag Queue Action field value not specified for the CONTINUE
TARGET I/O CCB?  This looks like an omission to me.  If I am right, then
the following bullet should be added to the bullets under bullet C:

1) The QUEUE TAG message (HEAD OF QUEUE TAG, ORDERED QUEUE TAG, or SIMPLE
QUEUE TAG) shall be  placed in the Tag Queue Action field of  the ACCEPT
TARGET I/O CCB.


{076}{E}{11.3.8.6 P5 BulletD2}---------------------------------------------
{Original text}
2) Cause an unexpected bus free. Section 5.1.1 SCSI 2 specification.

{Comments}
The second sentence in the bullet has no verb.  Also, it's "SCSI-2" not
"SCSI 2".  Also change the word "Section" to "Clause", because this is an
ISO document.  Change the bullet to read:

2) Cause an unexpected bus free.  See Clause 5.1.1 in the SCSI-2
specification.


{077}{E}{11.3.8.6 P5 BulletF}----------------------------------------------
{Original text}
F) It is the responsibility of the Host Target peripheral driver to
preserve Contingent Allegiance. . . .

{Comments}
There is a requirement in this sentence that is not identified with the
magic word, "shall."  Change the sentence to read:

F) The Host Target peripheral driver shall preserve the Contingent
Allegiance condition. . . .


{078}{E}{11.3.8.7 P2}------------------------------------------------------
{Original text}
Note:
For this example Disconnects are mandatory. The SIM/HBA is selected  by an
initiator, the timeout period starts. IDENTIFY message is received and
SIM/HBA drives the bus to command phase. The  command is received and
SIM/HBA disconnects. When the SIM/HBA disconnects from the bus (bus free)
the timeout period ends, no action taken. If the timer expired before the
disconnect then this ACCEPT TARGET I/O CCB shall represent a timeout
condition.

For this example Disconnects are not allowed. The SIM/HBA is selected by an
initiator, the timeout period starts. IDENTIFY message is received and
SIM/HBA drives the bus to command phase. The command is received but
SIM/HBA is not allowed to disconnect. The SIM/HBA  calls back the Host
Target Mode peripheral driver. The Host Target Mode peripheral driver
responds with a CONTINUE TARGET I/O CCB that causes a transition to data
phase. ACCEPT TARGET I/O timeout period ends and a new period begins as
specified by the CONTINUE TARGET I/O CCB.

End Note:

{Comments}
There are several poorly formed and incorrectly punctuated sentences in
this note.  Also, the second sentence in each paragraph should begin with
the word "When," to give some sense of time relationships.  The note should
be rewritten to read:

Note:
For this example Disconnects are mandatory.  When the SIM/HBA is selected
by an initiator, the timeout period starts.  The IDENTIFY message is
received and the SIM/HBA drives the bus to command phase.  The command is
received and the SIM/HBA disconnects.  When the SIM/HBA disconnects from
the bus (bus free), the timeout period ends.  No action taken.  If the
timer expired before the disconnect, then this ACCEPT TARGET I/O CCB shall
represent a timeout condition.

For this example Disconnects are not allowed.  When the SIM/HBA is selected
by an initiator, the timeout period starts.  The IDENTIFY message is
received and the SIM/HBA drives the bus to command phase.  The command is
received but the SIM/HBA is not allowed to disconnect.  The SIM/HBA calls
back the Host Target Mode peripheral driver.  The Host Target Mode
peripheral driver responds with a CONTINUE TARGET I/O CCB that causes a
transition to data phase.  The ACCEPT TARGET I/O timeout period ends and a
new period begins as specified by the CONTINUE TARGET I/O CCB.

End Note:


{079}{T}{11.3.8.6 P2 BulletA2}---------------------------------------------
{Original text}
2) If the timeout period expires for the ACCEPT TARGET I/O CCB, the SIM/HBA
shall set the CAM status to Command Timeout.

{Comments}
There is a problem with this statement when disconnects are not allowed. 
To understand the problem you must review the second paragraph of the note
that describes these timeouts.  (Fortunately, this paragraph is contained
in my comment number 78.  So you can read it here.)

If the ACCEPT TARGET I/O CCB timeout expires after the SIM/HBA has made the
callback to the peripheral driver (but before the CONTINUE TARGET I/O CCB
is passed from the peripheral driver to the SIM/HBA), then the SIM/HBA does
not own the ACCEPT TARGET I/O CCB.  So, the SIM/HBA cannot alter the CAM
status field of the ACCEPT TARGET I/O CCB.  In fact, I do not see any
simple way for the SIM/HBA to report a timeout that occurs after the call
back is made to the peripheral driver.


{080}{E}{11.3.8.6 P2 BulletA3}---------------------------------------------
{Original text}
3) The proper Connect ID shall be set in the ACCEPT TARGET I/O CCB. The
Target ID of the initiator that selected this SIM/HBA shall be set in the
Initiator ID field.

{Comments}
The "target ID of the initiator" is a twisted concept.  How about changing
the bullet so that the second sentence reads:

3) The proper Connect ID shall be set in the ACCEPT TARGET I/O CCB. The
SCSI Bus ID of the initiator that selected this SIM/HBA shall be set in the
Initiator ID field.


{081}{E}{11.3.8.6 P2 BulletA4}---------------------------------------------
{Original text}
4) The SIM/HBA shall cause an unexpected bus free. Section  5.1.1 SCSI 2
specification.

{Comments}
The second sentence in the bullet has no verb.  Also, it's "SCSI-2" not
"SCSI 2".  Also change the word "Section" to "Clause", because this is an
ISO document.  Change the bullet to read:

4) The SIM/HBA shall cause an unexpected bus free. See Clause 5.1.1 in the
SCSI-2 specification.


{082}{E}{11.3.8.6 P2 BulletB3}---------------------------------------------
{Original text}
3) The proper Connect ID shall be set in the ACCEPT TARGET I/O CCB. The
Target ID of the initiator that selected this SIM/HBA shall be set in the
Initiator ID field.

{Comments}
This looks like a cut&paste bug.  I think ACCEPT TARGET I/O CCB should be
CONTINUE TARGET I/O CCB.  Also, the "target ID of the initiator" is a
twisted concept.  With these corrections, the bullet should read:

3) The proper Connect ID shall be set in the CONTINUE TARGET I/O CCB. The
SCSI Bus ID of the initiator that selected this SIM/HBA shall be set in the
Initiator ID field.


{083}{E}{11.3.8.6 P2 BulletB5}---------------------------------------------
{Original text}
5) The SIM/HBA shall cause an unexpected bus free. Section  5.1.1 SCSI 2
specification.

{Comments}
The second sentence in the bullet has no verb.  Also, it's "SCSI-2" not
"SCSI 2".  Also change the word "Section" to "Clause", because this is an
ISO document.  Change the bullet to read:

5) The SIM/HBA shall cause an unexpected bus free. See Clause 5.1.1 in the
SCSI-2 specification.


{084}{T}{11.3.9 Table 26}--------------------------------------------------
{Original text}
|  4 |   | Next CCB Pointer                          |

{Comments}
The Next CCB Pointer is used when multiple ACCEPT TARGET I/O CCBs are
passed to the SIM/HBA as part of the input with an ENABLE LUN CCB.  I think
that the Dir field should not be empty on this table entry.


{085}{T}{11.3.9 Table 26}--------------------------------------------------
{Original text}
|  1 |   | SCSI Status                               |

{Comments}
The SCSI Status field is set to CHECK CONDITION by the SIM/HBA in several
error cases.  I think that the Dir field should not be empty on this table
entry.


{086}{T}{11.3.10 Table 27}-------------------------------------------------
{Original text}
|  1 | O | SCSI Status       (SCSI status to be sent |
|    |   |                    to initiator)          |

{Comments}
The SCSI Status field is set to CHECK CONDITION by the SIM/HBA in several
error cases.  I think that the Dir field should be I/O on this table entry.


{087}{E}{11.3.10 P2}-------------------------------------------------------
{Original text}
The following bits are valid for the CAM flags field of the CONTINUE TARGET
I/O CCB:
  - Direction Out - Sending data from the target peripheral device to the
    initiator.
    - SG List/Data Buffer Pointer and Data Transfer Length fields shall be
      filled in.
  - Direction In - Receiving data from the initiator to the target 
    peripheral device.
    - SG List/Data Buffer Pointer and Data Transfer Length fields shall be
      filled in.

{Comments}
I find the use of dashes for both levels of this bulleted list confusing. 
At first glance, I find myself asking, "Are the margins out of whack, or
does this mean something?"  How about changing the second level of bullets
to plus signs?  Then, these section of the bulleted list would read:

The following bits are valid for the CAM flags field of the CONTINUE TARGET
I/O CCB:
  - Direction Out - Sending data from the target peripheral device to the
    initiator.
    + SG List/Data Buffer Pointer and Data Transfer Length fields shall be
      filled in.
  - Direction In - Receiving data from the initiator to the target 
    peripheral device.
    + SG List/Data Buffer Pointer and Data Transfer Length fields shall be
      filled in.


{088}{E}{11.3.11 P4 BulletD}-----------------------------------------------
{Original text}
D) All subsequent ACCEPT TARGET I/O and CONTINUE TARGET I/O CCBS received
by the SIM prior to the receipt of another ENABLE LUN CCB to enable a LUN
shall be returned with a CAM status of Invalid Request.

{Comments}
Throughout the document, the notation for multiple CCBs is "CCBs", not
"CCBS."  Correct the letter case usage here.  Also, the phrase "ENABLE LUN
CCB to enable a LUN" seems redundant.  Since ENABLE LUN CCBs can both
enable and disable a LUN for Host Target Mode operation, some extra words
are required to show the purpose of the ENABLE LUN CCB.  I propose the
following:

D) All subsequent ACCEPT TARGET I/O and CONTINUE TARGET I/O CCBs received
by the SIM prior to the receipt of another ENABLE LUN CCB that enables the
LUN shall be returned with a CAM status of Invalid Request.


{089}{E}{11.3.12.1 P2 BulletA4}--------------------------------------------
{Original text}
4) Any CONTINUE TARGET I/O or ACCEPT TARGET I/O CCBs that are received by
the SIM while the reset recovery is in progress shall be returned with a
CAM status of Bus Reset. Reset recovery is complete when the peripheral
driver issues a NOTIFY ACKNOWLEDGE CCB with the Reset Cleared field set,
and the Sequence Identifier equal to zero.

{Comments}
The second sentence in the bullet is a completely separate thought.  To
identify its importance to readers, it should be a separate bullet.  Also,
the second sentence contains a requirement that is not identified with the
magic word, "shall."  Change the bullet to read:

4) Any CONTINUE TARGET I/O or ACCEPT TARGET I/O CCBs that are received by
the SIM while the reset recovery is in progress shall be returned with a
CAM status of Bus Reset.

5) Reset recovery shall be complete when the peripheral driver issues a
NOTIFY ACKNOWLEDGE CCB with the Reset Cleared field set, and the Sequence
Identifier equal to zero.


{090}{T}{11.3.12.1 P2 BulletA5}--------------------------------------------
{Original text}
5) The SIM/HBA unacknowledged event list is cleared for all registered LUNs
on the bus which suffered the bus reset.

{Comments}
This bullet should be performed before the Host Target Mode peripheral
driver asynch callback function is called.  Otherwise, unacknowledged
events generated by the Host Target Mode peripheral driver asynch callback
function will be cleared.  The SIM/HBA will become confused when the Host
Target Mode peripheral driver acknowledges these events.  Therefore, I
believe that this should be bullet 2.  Also, there is a requirement in this
bullet that is not identified with the magic word, "shall."  Move this
bullet and change it to read:

2) The SIM/HBA unacknowledged event list shall be cleared for all
registered LUNs on the bus which suffered the bus reset.


{091}{E}{11.3.12.1 P2 BulletB}---------------------------------------------
{Original text}
B) The Host Target Mode peripheral driver asynch callback shall:

{Comments}
I believe that "callback routine" is more correct that just plain
"callback."  Change this bullet to read:

B) The Host Target Mode peripheral driver asynch callback routine shall:


{092}{T}{11.3.12.1 P2 BulletB5}--------------------------------------------
{Original text}
5) The Host Target Mode peripheral driver shall issue/reissue ACCEPT TARGET
I/O CCB(s) so that the SIM/HBA can resume normal processing.

{Comments}
Somewhere during development of this standard, we dropped the requirement
that the SIM/HBA clear all ACCEPT TARGET I/O CCBs during reset processing. 
Therefore, it should not be necessary (in most cases) for the peripheral
driver to reissue ACCEPT TARGET I/O CCBs.  I recommend softening this
bullet to read:

5) If necessary, the Host Target Mode peripheral driver shall issue/reissue
ACCEPT TARGET I/O CCB(s) so that the SIM/HBA can resume normal processing.


{093}{E}{11.3.12.2 P2 BulletA1}--------------------------------------------
{Comments}
Add a blank line between the body of bullet A1 and the beginning of bullet
A1a.


{094}{E}{11.3.12.2 P2 BulletA4}--------------------------------------------
{Original text}
4) Any CONTINUE TARGET I/O or ACCEPT TARGET I/O CCBs that are received by
the SIM while the reset recovery is in progress shall be returned with a
CAM status of Bus Reset. Reset recovery is complete when the peripheral
driver issues a NOTIFY ACKNOWLEDGE CCB with the Reset Cleared field set,
and the Sequence Identifier equal to zero.

{Comments}
The second sentence in the bullet is a completely separate thought.  To
identify its importance to readers, it should be a separate bullet.  Also,
the second sentence contains a requirement that is not identified with the
magic word, "shall."  Change the bullet to read:

4) Any CONTINUE TARGET I/O or ACCEPT TARGET I/O CCBs that are received by
the SIM while the reset recovery is in progress shall be returned with a
CAM status of Bus Reset.

5) Reset recovery shall be complete when the peripheral driver issues a
NOTIFY ACKNOWLEDGE CCB with the Reset Cleared field set, and the Sequence
Identifier equal to zero.


{095}{T}{11.3.12.2 P2 BulletA5}--------------------------------------------
{Original text}
5) The SIM/HBA unacknowledged event list is cleared for all registered LUNs
on the bus which suffered the bus reset.

{Comments}
This bullet should be performed before the Host Target Mode peripheral
driver asynch callback function is called.  Otherwise, unacknowledged
events generated by the Host Target Mode peripheral driver asynch callback
function will be cleared.  The SIM/HBA will become confused when the Host
Target Mode peripheral driver acknowledges these events.  Therefore, I
believe that this should be bullet 2.  Also, there is a requirement in this
bullet that is not identified with the magic word, "shall."  Move this
bullet and change it to read:

2) The SIM/HBA unacknowledged event list shall be cleared for all
registered LUNs on the bus which suffered the bus reset.


{096}{E}{11.3.12.2 P2 BulletB}---------------------------------------------
{Original text}
B) The Host Target Mode peripheral driver asynch callback shall:

{Comments}
I believe that "callback routine" is more correct that just plain
"callback."  Change this bullet to read:

B) The Host Target Mode peripheral driver asynch callback routine shall:


{097}{T}{11.3.12.2 P2 BulletB5}--------------------------------------------
{Original text}
5) The Host Target Mode peripheral driver shall issue/reissue ACCEPT TARGET
I/O CCB(s) so that the SIM/HBA can resume normal processing.

{Comments}
Somewhere during development of this standard, we dropped the requirement
that the SIM/HBA clear all ACCEPT TARGET I/O CCBs during reset processing. 
Therefore, it should not be necessary (in most cases) for the peripheral
driver to reissue ACCEPT TARGET I/O CCBs.  I recommend softening this
bullet to read:

5) If necessary, the Host Target Mode peripheral driver shall issue/reissue
ACCEPT TARGET I/O CCB(s) so that the SIM/HBA can resume normal processing.


{098}{E}{11.3.13 P1 S1}----------------------------------------------------
{Original text}
For a LUN that is not enabled, when a CDB is received by the SIM/HBA from
the SCSI bus, one of the following sequences can occur:

{Comments}
Clarify this sentence by rewriting it to read:

When a CDB is received by the SIM/HBA for a LUN that is not enabled, one of
the following sequences shall occur depending on the command received:


{099}{E}{11.3.13 P2 BulletA}-----------------------------------------------
{Original text}
A) INQUIRY Command

1) If the SIM receives a CDB for the INQUIRY command for a non-enabled LUN,
the SIM shall return only byte 0 of the inquiry data set to 7FH:

2) The peripheral qualifier is set to 011B indicating the target is not
capable of supporting a physical device on this logical unit.

3) The peripheral device type set to 1FH indicating no device type.

{Comments}
These are not several separate thoughts.  They are further qualifications
of a single thought.  Rewrite this as a paragraph of sentences (not
bullets).  Also, the current bullet 1 can be broken in to two sentences. 
Rewrite this bullet as follows:

A) INQUIRY Command

If the SIM receives a CDB for the INQUIRY command for a non-enabled LUN,
the SIM shall return only byte 0 of the inquiry data.  The returned byte
shall be set to 7FH.  The peripheral qualifier is set to 011B indicating
the target is not capable of supporting a physical device on this logical
unit.  The peripheral device type set to 1FH indicating no device type.


{100}{E}{11.3.13 P2 BulletC}-----------------------------------------------
{Original text}
If a command other than INQUIRY or REQUEST SENSE are received for a
non-enabled LUN, the SCSI status returned shall be CHECK CONDITION. Any
subsequent REQUEST SENSE command shall behave as in Section 11.3.13 Item B.

{Comments}
There is no need for the section (clause) reference here.  The information
being referenced is in the immediately preceding paragraph.  Change this
bullet to read:

If a command other than INQUIRY or REQUEST SENSE are received for a
non-enabled LUN, the SCSI status returned shall be CHECK CONDITION.
Any subsequent REQUEST SENSE command shall behave as described Item B
immediately above.





More information about the T10 mailing list