|
|
@@ -142,6 +142,11 @@ void process_Status()
|
|
|
{
|
|
|
scsiEnterPhase(STATUS);
|
|
|
|
|
|
+ if (scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_EWSD)
|
|
|
+ {
|
|
|
+ s2s_delay_ms(1);
|
|
|
+ }
|
|
|
+
|
|
|
uint8_t message;
|
|
|
|
|
|
uint8_t control = scsiDev.cdb[scsiDev.cdbLen - 1];
|
|
|
@@ -537,6 +542,12 @@ static void process_Command()
|
|
|
scsiDev.data[7] = 10; // additional length
|
|
|
scsiDev.data[12] = scsiDev.target->sense.asc >> 8;
|
|
|
scsiDev.data[13] = scsiDev.target->sense.asc;
|
|
|
+ if ((scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_EWSD))
|
|
|
+ {
|
|
|
+ /* EWSD seems not to want something behind additional length. (8 + 0x0e = 22) */
|
|
|
+ allocLength=22;
|
|
|
+ scsiDev.data[7] = 0x0e;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// Silently truncate results. SCSI-2 spec 8.2.14.
|
|
|
@@ -551,8 +562,15 @@ static void process_Command()
|
|
|
// on receiving the unit attention response on boot, thus
|
|
|
// triggering another unit attention condition.
|
|
|
else if (scsiDev.target->unitAttention &&
|
|
|
- (scsiDev.boardCfg.flags & S2S_CFG_ENABLE_UNIT_ATTENTION))
|
|
|
+ scsiDev.target->unitAttention_stop == 0 &&
|
|
|
+ ((scsiDev.boardCfg.flags & S2S_CFG_ENABLE_UNIT_ATTENTION) ||
|
|
|
+ (scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_EWSD)))
|
|
|
{
|
|
|
+ /* EWSD requires unitAttention to be sent only once. */
|
|
|
+ if (scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_EWSD)
|
|
|
+ {
|
|
|
+ scsiDev.target->unitAttention_stop = 1;
|
|
|
+ }
|
|
|
scsiDev.target->sense.code = UNIT_ATTENTION;
|
|
|
scsiDev.target->sense.asc = scsiDev.target->unitAttention;
|
|
|
|
|
|
@@ -1280,7 +1298,13 @@ void scsiInit()
|
|
|
scsiDev.targets[i].reserverId = -1;
|
|
|
if (firstInit)
|
|
|
{
|
|
|
- scsiDev.targets[i].unitAttention = POWER_ON_RESET;
|
|
|
+ if ((cfg->deviceType == S2S_CFG_MO) && (scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_EWSD))
|
|
|
+ {
|
|
|
+ scsiDev.targets[i].unitAttention = POWER_ON_RESET_OR_BUS_DEVICE_RESET_OCCURRED;
|
|
|
+ } else
|
|
|
+ {
|
|
|
+ scsiDev.targets[i].unitAttention = POWER_ON_RESET;
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|