2005-03-02 07:00:26

by Nauman

[permalink] [raw]
Subject: SCSI Target Mode issue...... pls help

hello all the gurus out there,
i have written simple Target for SCSI device. its in very early stage.
I started to handle simple commands from the INITIATOR like INQUIRY,
READ CAPACITY , REPORT LUN.
Now i am upto READ and WRITE. I have responded READ properly. Problem
is in WRITE command. For instance there is a case when i get multiple
WRITE command from INITIATOR
i queue command as i receive it. CTIO has to be sent to firmware for
each recieved command . in my case i send CTIO as i recieve the
command. now firmware has to send back the response for each CTIO i
sent. here is whats happening
i get 2 commands for WRITE. send CTIO for cmd1 and cmd2 and what i get
back from firmware is response of second cmd which is cmd2. cmd1's
command time out occurs and it fails to respond.

if any one has done basic handshake and handled READ and WRITE for
TARGET mode then please share ur knowledge......
Best Regards,
--
When the going gets tough, The tough gets going...!
Peace ,
Nauman.


2005-03-02 10:12:33

by Vladislav Bolkhovitin

[permalink] [raw]
Subject: Re: SCSI Target Mode issue...... pls help

Check SCSI target mid-level (SCST) with Qlogic target driver on
http://scst.sourceforge.net.

Best regards,
Vlad

Nauman wrote:
> hello all the gurus out there,
> i have written simple Target for SCSI device. its in very early stage.
> I started to handle simple commands from the INITIATOR like INQUIRY,
> READ CAPACITY , REPORT LUN.
> Now i am upto READ and WRITE. I have responded READ properly. Problem
> is in WRITE command. For instance there is a case when i get multiple
> WRITE command from INITIATOR
> i queue command as i receive it. CTIO has to be sent to firmware for
> each recieved command . in my case i send CTIO as i recieve the
> command. now firmware has to send back the response for each CTIO i
> sent. here is whats happening
> i get 2 commands for WRITE. send CTIO for cmd1 and cmd2 and what i get
> back from firmware is response of second cmd which is cmd2. cmd1's
> command time out occurs and it fails to respond.
>
> if any one has done basic handshake and handled READ and WRITE for
> TARGET mode then please share ur knowledge......
> Best Regards,