Lines Matching refs:sr
4140 SCSIREQ sr;
4149 RT_ZERO(sr.abCDB);
4150 sr.abCDB[0] = SCSI_REPORT_LUNS;
4151 sr.abCDB[1] = 0; /* reserved */
4152 sr.abCDB[2] = 0; /* reserved */
4153 sr.abCDB[3] = 0; /* reserved */
4154 sr.abCDB[4] = 0; /* reserved */
4155 sr.abCDB[5] = 0; /* reserved */
4156 sr.abCDB[6] = sizeof(rlundata) >> 24;
4157 sr.abCDB[7] = (sizeof(rlundata) >> 16) & 0xff;
4158 sr.abCDB[8] = (sizeof(rlundata) >> 8) & 0xff;
4159 sr.abCDB[9] = sizeof(rlundata) & 0xff;
4160 sr.abCDB[10] = 0; /* reserved */
4161 sr.abCDB[11] = 0; /* control */
4166 sr.enmXfer = SCSIXFER_FROM_TARGET;
4167 sr.cbCDB = 12;
4168 sr.cbI2TData = 0;
4169 sr.paI2TSegs = NULL;
4170 sr.cI2TSegs = 0;
4171 sr.cbT2IData = DataSeg.cbSeg;
4172 sr.paT2ISegs = &DataSeg;
4173 sr.cT2ISegs = 1;
4174 sr.cbSense = sizeof(sr.abSense);
4175 rc = iscsiCommandSync(pImage, &sr, false, VERR_INVALID_STATE);
4185 RT_ZERO(sr.abCDB);
4186 sr.abCDB[0] = SCSI_INQUIRY;
4187 sr.abCDB[1] = 0; /* reserved */
4188 sr.abCDB[2] = 0; /* reserved */
4189 sr.abCDB[3] = 0; /* reserved */
4190 sr.abCDB[4] = sizeof(data8);
4191 sr.abCDB[5] = 0; /* control */
4196 sr.enmXfer = SCSIXFER_FROM_TARGET;
4197 sr.cbCDB = 6;
4198 sr.cbI2TData = 0;
4199 sr.paI2TSegs = NULL;
4200 sr.cI2TSegs = 0;
4201 sr.cbT2IData = DataSeg.cbSeg;
4202 sr.paT2ISegs = &DataSeg;
4203 sr.cT2ISegs = 1;
4204 sr.cbSense = sizeof(sr.abSense);
4205 rc = iscsiCommandSync(pImage, &sr, true /* fRetry */, VERR_INVALID_STATE);
4208 uint8_t devType = (sr.cbT2IData > 0) ? data8[0] & SCSI_DEVTYPE_MASK : 255;
4218 uint8_t uCmdQueue = (sr.cbT2IData >= 8) ? data8[7] & SCSI_INQUIRY_CMDQUE_MASK : 0;
4242 RT_ZERO(sr.abCDB);
4243 sr.abCDB[0] = SCSI_MODE_SENSE_6;
4244 sr.abCDB[1] = 0; /* dbd=0/reserved */
4245 sr.abCDB[2] = 0x3f; /* pc=0/page code=0x3f, ask for all pages */
4246 sr.abCDB[3] = 0; /* subpage code=0, return everything in page_0 format */
4247 sr.abCDB[4] = sizeof(data4); /* allocation length=4 */
4248 sr.abCDB[5] = 0; /* control */
4253 sr.enmXfer = SCSIXFER_FROM_TARGET;
4254 sr.cbCDB = 6;
4255 sr.cbI2TData = 0;
4256 sr.paI2TSegs = NULL;
4257 sr.cI2TSegs = 0;
4258 sr.cbT2IData = DataSeg.cbSeg;
4259 sr.paT2ISegs = &DataSeg;
4260 sr.cT2ISegs = 1;
4261 sr.cbSense = sizeof(sr.abSense);
4262 rc = iscsiCommandSync(pImage, &sr, true /* fRetry */, VERR_INVALID_STATE);
4281 RT_ZERO(sr.abCDB);
4282 sr.abCDB[0] = SCSI_SERVICE_ACTION_IN_16;
4283 sr.abCDB[1] = SCSI_SVC_ACTION_IN_READ_CAPACITY_16; /* subcommand */
4284 sr.abCDB[10+3] = sizeof(data12); /* allocation length (dword) */
4289 sr.enmXfer = SCSIXFER_FROM_TARGET;
4290 sr.cbCDB = 16;
4291 sr.cbI2TData = 0;
4292 sr.paI2TSegs = NULL;
4293 sr.cI2TSegs = 0;
4294 sr.cbT2IData = DataSeg.cbSeg;
4295 sr.paT2ISegs = &DataSeg;
4296 sr.cT2ISegs = 1;
4297 sr.cbSense = sizeof(sr.abSense);
4299 rc = iscsiCommandSync(pImage, &sr, false /* fRetry */, VINF_SUCCESS);
4306 switch (sr.status)
4326 if((sr.abSense[2] & 0x0f) == SCSI_SENSE_UNIT_ATTENTION)
4328 if( sr.abSense[12] == SCSI_ASC_POWER_ON_RESET_BUS_DEVICE_RESET_OCCURRED
4329 && sr.abSense[13] == SCSI_ASCQ_POWER_ON_RESET_BUS_DEVICE_RESET_OCCURRED)
4333 rc = iscsiCommandSync(pImage, &sr, false /* fRetry */, VINF_SUCCESS);
4345 rc = iscsiCommandSync(pImage, &sr, false /* fRetry */, VINF_SUCCESS);
4359 sr.abCDB[0] = SCSI_READ_CAPACITY;
4360 sr.abCDB[1] = 0; /* reserved */
4361 sr.abCDB[2] = 0; /* reserved */
4362 sr.abCDB[3] = 0; /* reserved */
4363 sr.abCDB[4] = 0; /* reserved */
4364 sr.abCDB[5] = 0; /* reserved */
4365 sr.abCDB[6] = 0; /* reserved */
4366 sr.abCDB[7] = 0; /* reserved */
4367 sr.abCDB[8] = 0; /* reserved */
4368 sr.abCDB[9] = 0; /* control */
4373 sr.enmXfer = SCSIXFER_FROM_TARGET;
4374 sr.cbCDB = 10;
4375 sr.cbI2TData = 0;
4376 sr.paI2TSegs = NULL;
4377 sr.cI2TSegs = 0;
4378 sr.cbT2IData = DataSeg.cbSeg;
4379 sr.paT2ISegs = &DataSeg;
4380 sr.cT2ISegs = 1;
4381 sr.cbSense = sizeof(sr.abSense);
4382 rc = iscsiCommandSync(pImage, &sr, false /* fRetry */, VINF_SUCCESS);
4389 switch (sr.status)
4410 if((sr.abSense[2] & 0x0f) == SCSI_SENSE_UNIT_ATTENTION)
4412 if( sr.abSense[12] == SCSI_ASC_POWER_ON_RESET_BUS_DEVICE_RESET_OCCURRED
4413 && sr.abSense[13] == SCSI_ASCQ_POWER_ON_RESET_BUS_DEVICE_RESET_OCCURRED)
4417 rc = iscsiCommandSync(pImage, &sr, false /* fRetry */, VINF_SUCCESS);
4429 rc = iscsiCommandSync(pImage, &sr, false /* fRetry */, VINF_SUCCESS);
4457 sr.abCDB[0] = SCSI_MODE_SENSE_6;
4458 sr.abCDB[1] = 0;
4459 sr.abCDB[2] = (0x00 << 6) | (0x08 & 0x3f); /* Current values and caching mode page */
4460 sr.abCDB[3] = 0; /* Sub page code. */
4461 sr.abCDB[4] = sizeof(aCachingModePage) & 0xff;
4462 sr.abCDB[5] = 0;
4467 sr.enmXfer = SCSIXFER_FROM_TARGET;
4468 sr.cbCDB = 6;
4469 sr.cbI2TData = 0;
4470 sr.paI2TSegs = NULL;
4471 sr.cI2TSegs = 0;
4472 sr.cbT2IData = DataSeg.cbSeg;
4473 sr.paT2ISegs = &DataSeg;
4474 sr.cT2ISegs = 1;
4475 sr.cbSense = sizeof(sr.abSense);
4476 rc = iscsiCommandSync(pImage, &sr, false /* fRetry */, VINF_SUCCESS);
4478 && (sr.status == SCSI_STATUS_OK)
4499 sr.abCDB[0] = SCSI_MODE_SELECT_6;
4500 sr.abCDB[1] = 0; /* Don't write the page into NV RAM. */
4501 sr.abCDB[2] = 0;
4502 sr.abCDB[3] = 0;
4503 sr.abCDB[4] = sizeof(aCachingModePage) & 0xff;
4504 sr.abCDB[5] = 0;
4509 sr.enmXfer = SCSIXFER_TO_TARGET;
4510 sr.cbCDB = 6;
4511 sr.cbI2TData = DataSeg.cbSeg;
4512 sr.paI2TSegs = &DataSeg;
4513 sr.cI2TSegs = 1;
4514 sr.cbT2IData = 0;
4515 sr.paT2ISegs = NULL;
4516 sr.cT2ISegs = 0;
4517 sr.cbSense = sizeof(sr.abSense);
4518 sr.status = 0;
4519 rc = iscsiCommandSync(pImage, &sr, false /* fRetry */, VINF_SUCCESS);
4521 && (sr.status == SCSI_STATUS_OK))
4529 pImage->pszTargetName, rc, sr.status));
4530 LogRel(("iSCSI: Sense:\n%.*Rhxd\n", sr.cbSense, sr.abSense));
4539 LogRel(("iSCSI: Sense:\n%.*Rhxd\n", sr.cbSense, sr.abSense));