READ SUPPORTED OPCODES. Update the signature to allow setting all of the
parameters to this command.
This commit is contained in:
@@ -1633,13 +1633,16 @@ iscsi_release6_task(struct iscsi_context *iscsi, int lun,
|
||||
}
|
||||
|
||||
struct scsi_task *
|
||||
iscsi_report_supported_opcodes_task(struct iscsi_context *iscsi,
|
||||
int lun, int return_timeouts, int maxsize,
|
||||
iscsi_report_supported_opcodes_task(struct iscsi_context *iscsi, int lun,
|
||||
int rctd, int options,
|
||||
int opcode, int sa,
|
||||
uint32_t alloc_len,
|
||||
iscsi_command_cb cb, void *private_data)
|
||||
{
|
||||
struct scsi_task *task;
|
||||
|
||||
task = scsi_cdb_report_supported_opcodes(return_timeouts, maxsize);
|
||||
task = scsi_cdb_report_supported_opcodes(rctd, options, opcode, sa,
|
||||
alloc_len);
|
||||
if (task == NULL) {
|
||||
iscsi_set_error(iscsi, "Out-of-memory: Failed to create "
|
||||
"Maintenance In/Read Supported Op Codes cdb.");
|
||||
|
||||
@@ -895,7 +895,7 @@ scsi_maintenancein_datain_unmarshall(struct scsi_task *task)
|
||||
* MAINTENANCE In / Read Supported Op Codes
|
||||
*/
|
||||
struct scsi_task *
|
||||
scsi_cdb_report_supported_opcodes(int return_timeouts, uint32_t alloc_len)
|
||||
scsi_cdb_report_supported_opcodes(int rctd, int options, enum scsi_opcode opcode, int sa, uint32_t alloc_len)
|
||||
{
|
||||
struct scsi_task *task;
|
||||
|
||||
@@ -907,12 +907,16 @@ scsi_cdb_report_supported_opcodes(int return_timeouts, uint32_t alloc_len)
|
||||
memset(task, 0, sizeof(struct scsi_task));
|
||||
task->cdb[0] = SCSI_OPCODE_MAINTENANCE_IN;
|
||||
task->cdb[1] = SCSI_REPORT_SUPPORTED_OP_CODES;
|
||||
task->cdb[2] = SCSI_REPORT_SUPPORTING_OPS_ALL;
|
||||
task->cdb[2] = options & 0x07;
|
||||
|
||||
if (return_timeouts) {
|
||||
if (rctd) {
|
||||
task->cdb[2] |= 0x80;
|
||||
}
|
||||
|
||||
task->cdb[3] = opcode;
|
||||
|
||||
scsi_set_uint32(&task->cdb[4], sa);
|
||||
|
||||
scsi_set_uint32(&task->cdb[6], alloc_len);
|
||||
|
||||
task->cdb_size = 12;
|
||||
|
||||
@@ -1031,13 +1031,16 @@ iscsi_release6_sync(struct iscsi_context *iscsi, int lun)
|
||||
}
|
||||
|
||||
struct scsi_task *
|
||||
iscsi_report_supported_opcodes_sync(struct iscsi_context *iscsi, int lun, int return_timeouts, int maxsize)
|
||||
iscsi_report_supported_opcodes_sync(struct iscsi_context *iscsi, int lun,
|
||||
int rctd, int options,
|
||||
int opcode, int sa,
|
||||
uint32_t alloc_len)
|
||||
{
|
||||
struct iscsi_sync_state state;
|
||||
|
||||
memset(&state, 0, sizeof(state));
|
||||
|
||||
if (iscsi_report_supported_opcodes_task(iscsi, lun, return_timeouts, maxsize, scsi_sync_cb, &state) == NULL) {
|
||||
if (iscsi_report_supported_opcodes_task(iscsi, lun, rctd, options, opcode, sa, alloc_len, scsi_sync_cb, &state) == NULL) {
|
||||
iscsi_set_error(iscsi, "Failed to send MaintenanceIn:"
|
||||
"Report Supported Opcodes command");
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user