Commit 5f028086 authored by Brian King's avatar Brian King Committed by James Bottomley

[PATCH] ipr: Allow Query Resource State adapter command to

The ipr adapters support an adapter command directed at the device
resource called "Query Resource State". It can be used to retrieve
state information about the resource it is sent to, including the
currently negotiated scsi speed. The adapter interface requires the
IPR_RQTYPE_IOACMD to be set on this command, so we set it if the
command code matches.
Signed-off-by: default avatarBrian King <brking@us.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 48e68861
......@@ -3904,7 +3904,8 @@ static int ipr_queuecommand(struct scsi_cmnd *scsi_cmd,
ioarcb->cmd_pkt.flags_lo |= ipr_get_task_attributes(scsi_cmd);
}
if (!ipr_is_gscsi(res) && scsi_cmd->cmnd[0] >= 0xC0)
if (scsi_cmd->cmnd[0] >= 0xC0 &&
(!ipr_is_gscsi(res) || scsi_cmd->cmnd[0] == IPR_QUERY_RSRC_STATE))
ioarcb->cmd_pkt.request_type = IPR_RQTYPE_IOACMD;
if (ipr_is_ioa_resource(res) && scsi_cmd->cmnd[0] == MODE_SELECT)
......
......@@ -146,6 +146,7 @@
/*
* Adapter Commands
*/
#define IPR_QUERY_RSRC_STATE 0xC2
#define IPR_RESET_DEVICE 0xC3
#define IPR_RESET_TYPE_SELECT 0x80
#define IPR_LUN_RESET 0x40
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment