beautypg.com

Teledyne LeCroy Sierra M6-4 SAS_SATA Protocol Analyzer User Manual User Manual

Page 193

background image

    

Sierra M6‐4 SAS/SATA Protocol Analyzer User Manual

191

Target and Device Emulation

Teledyne LeCroy

Figure 2.184: SAS: SAS Commands Error Setting Dialog

1. Click the SSP, SMP or Task option button to display the commands available for each

of these categories in the Event Selection window.

2. Click a command for which to set an error, check the Generate Error when: check

box, then enter values for LBA, TAG, or Command number in the corresponding text
box.
Command number specifies the number of the command for which you want to
inject error. For example, if you select the Inquiry command, then enter 2 for the
Command Number, you inject error on the 2nd Inquiry command.
Number of error commands specifies the number of commands for which you want
to inject error. For example, if you select the Inquiry command, then enter 2 for the
Command Number, and enter 3 for Number of Error Commands, the target
emulator injects error on the 2, 3, and 4 Inquiry commands, because you want to
inject on 2nd command and continue error injection as much as 3 times.
When using Command Number as the Error Injection filter, you can repeat the
erring‐command sets by checking Repeat error. The default value is 1, which injects
error only once, with no repeats. In the above example, the system injects error on
the 2, 3, and 4 Inquiry commands and does not inject error for other commands. 
If you enter 2 for Repeat Error, the system injects error on the 2nd, 3rd, 4th, 6th, 7th,
and 8th commands. 
If you enter 3 for Repeat Error, target emulator injects error on the 2nd, 3rd, 4th,
6th, 7th, 8th, 10th, 11th, and 12th commands. 
If you set Repeat Error to 0, it means infinity, and the system injects error on the
2nd, 3rd, 4th, 6th, 7th, 8th, 10th, 11th, 12th, 14th, 15th, 16th, 18th, 19th, 20th,
22th, 23th, 24th, and so on commands.

Note:

Repeat error resets the target emulator received command counter.

In the API, use the following functions:

ErInjSetSCSICommandGenerateError: Enable error injection on a command.
Specify Command Number and Number of Error Commands in the 4th and 6th
parameters. 
See API reference manual (section 5.5.139, page 748).

ErInjSetSCSICommandRepeatedErrorOnCommandNumber
(int nCommand, BOOL bEnable, 
short iCountOfRepeatedErrorsOnCommands): 
nCommand specifies SCSI command. See 6.52 SCSI Command type definition in
API manual.
bEnable: TRUE means you want repeat error as much as iCountOfRepeatedError‐
sOnCommands.

3. Click the Command fail with check condition check box, click the down arrow on

the Sense Key drop down list box, choose an error type, and then enter values for
ASC and ASCQ in the corresponding text boxes.
Some Check Condition Sense Key and ASC/ASCQ values are (see

Figure 2.185 on

page 190

):

01, 1807 (soft error, RECOVERED DATA WITH ECC ‐ DATA REWRITTEN)