Re: [PATCH] tmscsim: INQUIRY always only untagged

Guennadi Liakhovetski
2004-09-06T13:18:12Z

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1076 bytes --]

On Mon, 6 Sep 2004, Christoph Hellwig wrote:

> Patch looks good to me. Two hints for a possible followon patch:
>
>> @@ -1552,15 +1520,11 @@
>> pDCB->Inquiry7 = ptr->Flags;
>>
>> ckc_e:
>
> Here we still have some INQUIRY snooping, and if you look how
> ptr is set you'll see it'll OOPS for machines with more than 1GB of memory.

Right. Will think about a fix, thanks.

>> - dc390_updateDCB(pACB, pDCB);
>> + if (pDCB->DevMode & SYNC_NEGO_)
>> + pDCB->SyncMode |= SYNC_ENABLE;
>> + else {
>> + pDCB->SyncMode = 0;
>
> pDCB is memset to 0 Еt the start of the function, so the 0 initialization
> here isn't nessecary strictly speaking.

Well, a few lines above on a multi-LUN device for LUN > 0 it will be set
from LUN 0:

pDCB->SyncMode = pDCB2->SyncMode & SYNC_NEGO_DONE;

so, purely theoretically it could be non-zero at that point, at least,
that's why I put

pDCB->SyncMode = 0;

there. But, DevMode is set from LUN 0, so, yes, you are right.

Thanks