Commit 3fe7cfb9 authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

[SCSI] qla2xxx: Check alternate 'reason' code during GPSC status handling.

Some switches return 0x09 (Command not supported) as the reason
code for GPSC failure.  Check for this code, and disable
additional GPSC queries if found.
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 7d232c74
...@@ -1611,6 +1611,7 @@ typedef struct fc_port { ...@@ -1611,6 +1611,7 @@ typedef struct fc_port {
#define CT_ACCEPT_RESPONSE 0x8002 #define CT_ACCEPT_RESPONSE 0x8002
#define CT_REASON_INVALID_COMMAND_CODE 0x01 #define CT_REASON_INVALID_COMMAND_CODE 0x01
#define CT_REASON_CANNOT_PERFORM 0x09 #define CT_REASON_CANNOT_PERFORM 0x09
#define CT_REASON_COMMAND_UNSUPPORTED 0x0b
#define CT_EXPL_ALREADY_REGISTERED 0x10 #define CT_EXPL_ALREADY_REGISTERED 0x10
#define NS_N_PORT_TYPE 0x01 #define NS_N_PORT_TYPE 0x01
......
...@@ -1841,8 +1841,10 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list) ...@@ -1841,8 +1841,10 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list)
"GPSC")) != QLA_SUCCESS) { "GPSC")) != QLA_SUCCESS) {
/* FM command unsupported? */ /* FM command unsupported? */
if (rval == QLA_INVALID_COMMAND && if (rval == QLA_INVALID_COMMAND &&
ct_rsp->header.reason_code == (ct_rsp->header.reason_code ==
CT_REASON_INVALID_COMMAND_CODE) { CT_REASON_INVALID_COMMAND_CODE ||
ct_rsp->header.reason_code ==
CT_REASON_COMMAND_UNSUPPORTED)) {
DEBUG2(printk("scsi(%ld): GPSC command " DEBUG2(printk("scsi(%ld): GPSC command "
"unsupported, disabling query...\n", "unsupported, disabling query...\n",
ha->host_no)); ha->host_no));
......
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