]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] qla2xxx: Check alternate 'reason' code during GPSC status handling.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Thu, 3 Apr 2008 20:13:23 +0000 (13:13 -0700)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Mon, 7 Apr 2008 17:19:14 +0000 (12:19 -0500)
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: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_gs.c

index 7e6b6da6a67d2ea94a76ec5428f193d6a7537d4d..3843eaa3af06ff5c2320cd04ce75fd395fecd7e2 100644 (file)
@@ -1611,6 +1611,7 @@ typedef struct fc_port {
 #define CT_ACCEPT_RESPONSE     0x8002
 #define CT_REASON_INVALID_COMMAND_CODE 0x01
 #define CT_REASON_CANNOT_PERFORM       0x09
+#define CT_REASON_COMMAND_UNSUPPORTED  0x0b
 #define CT_EXPL_ALREADY_REGISTERED     0x10
 
 #define NS_N_PORT_TYPE 0x01
index e6578ce34ecd0275a1e366849d06e8c56204e35c..980ccb3eed33231cbdfe0327eb4122247feb37c5 100644 (file)
@@ -1841,8 +1841,10 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list)
                    "GPSC")) != QLA_SUCCESS) {
                        /* FM command unsupported? */
                        if (rval == QLA_INVALID_COMMAND &&
-                           ct_rsp->header.reason_code ==
-                           CT_REASON_INVALID_COMMAND_CODE) {
+                           (ct_rsp->header.reason_code ==
+                               CT_REASON_INVALID_COMMAND_CODE ||
+                            ct_rsp->header.reason_code ==
+                               CT_REASON_COMMAND_UNSUPPORTED)) {
                                DEBUG2(printk("scsi(%ld): GPSC command "
                                    "unsupported, disabling query...\n",
                                    ha->host_no));