From: Matthew J. <lyd...@gm...> - 2007-06-29 06:58:46
|
Hmm. Ouhgt to work and I know it does when I run my scsi_target toy test. Let me think about this for a second. On 6/29/07, Stanislaw Gruszka <sta...@op...> wrote: > Matthew Jacob wrote: > > Yes, autosense works. Maybe you need to show me your connector code so > > I can tell you what flags you might have missed setting. > > > Test results presented here was on ramdisk scsi_target.c from Feral sources > (from 27.06.2007) with breaking functionality patch (attached). Patch > simply disable responding of READ, WRITE and REQUEST_SENSE commands, so sense > code is sending instead of any data for these commands. > > Here is part of my isp_scst.c where sense is set: > > if (scst_cmd_get_tgt_resp_flags(scst_cmd) & SCST_TSC_FLAG_STATUS) { > tmd->cd_hflags |= CDFH_STSVALID; > tmd->cd_scsi_status = scst_cmd_get_status(scst_cmd); > > if (tmd->cd_scsi_status == SCSI_CHECK) { > unsigned int slen = scst_cmd_get_sense_buffer_len(scst_cmd); > if (slen > TMD_SENSELEN) { > // FIMXE: info to user > slen = TMD_SENSELEN; > } > memcpy(tmd->cd_sense, scst_cmd_get_sense_buffer(scst_cmd), slen); > tmd->cd_hflags |= CDFH_SNSVALID; > tmd->cd_xfrlen = 0; > tmd->cd_hflags &= ~CDFH_DATA_MASK; > } > > SDprintk2("%s: status %d\n", __FUNCTION__, scst_cmd_get_status(scst_cmd)); > } > > > Anyway, I can not achieve auto sense work in my test environment, maybe > initiators drivers bug (but I have checked two initiators) ? > > -- > Cheers > Stanislaw Gruszka > > |