aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_gs.c
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2006-12-13 22:20:28 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-01-03 17:57:54 -0500
commit4346b14942dbb65e5d4fa7ec0e6567c39861ae6c (patch)
tree28eec7d1a36de84bb7cd794fd833c1832b15fdd1 /drivers/scsi/qla2xxx/qla_gs.c
parent71ea9949a307e92fd5f8b4107814014464f38f91 (diff)
[SCSI] qla2xxx: Detect GPSC capabilities within a fabric.
Disable subsequent GPSC queries if Fabric Management services do not support the operation. Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_gs.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_gs.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c
index 220ec41b27fc..ec5b2dd90d6a 100644
--- a/drivers/scsi/qla2xxx/qla_gs.c
+++ b/drivers/scsi/qla2xxx/qla_gs.c
@@ -143,6 +143,7 @@ qla2x00_chk_ms_status(scsi_qla_host_t *ha, ms_iocb_entry_t *ms_pkt,
143 DEBUG2_3(qla2x00_dump_buffer( 143 DEBUG2_3(qla2x00_dump_buffer(
144 (uint8_t *)&ct_rsp->header, 144 (uint8_t *)&ct_rsp->header,
145 sizeof(struct ct_rsp_hdr))); 145 sizeof(struct ct_rsp_hdr)));
146 rval = QLA_INVALID_COMMAND;
146 } else 147 } else
147 rval = QLA_SUCCESS; 148 rval = QLA_SUCCESS;
148 break; 149 break;
@@ -1784,6 +1785,8 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list)
1784 1785
1785 if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) 1786 if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha))
1786 return QLA_FUNCTION_FAILED; 1787 return QLA_FUNCTION_FAILED;
1788 if (!ha->flags.gpsc_supported)
1789 return QLA_FUNCTION_FAILED;
1787 1790
1788 rval = qla2x00_mgmt_svr_login(ha); 1791 rval = qla2x00_mgmt_svr_login(ha);
1789 if (rval) 1792 if (rval)
@@ -1813,8 +1816,19 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list)
1813 /*EMPTY*/ 1816 /*EMPTY*/
1814 DEBUG2_3(printk("scsi(%ld): GPSC issue IOCB " 1817 DEBUG2_3(printk("scsi(%ld): GPSC issue IOCB "
1815 "failed (%d).\n", ha->host_no, rval)); 1818 "failed (%d).\n", ha->host_no, rval));
1816 } else if (qla2x00_chk_ms_status(ha, ms_pkt, ct_rsp, 1819 } else if ((rval = qla2x00_chk_ms_status(ha, ms_pkt, ct_rsp,
1817 "GPSC") != QLA_SUCCESS) { 1820 "GPSC")) != QLA_SUCCESS) {
1821 /* FM command unsupported? */
1822 if (rval == QLA_INVALID_COMMAND &&
1823 ct_rsp->header.reason_code ==
1824 CT_REASON_INVALID_COMMAND_CODE) {
1825 DEBUG2(printk("scsi(%ld): GPSC command "
1826 "unsupported, disabling query...\n",
1827 ha->host_no));
1828 ha->flags.gpsc_supported = 0;
1829 rval = QLA_FUNCTION_FAILED;
1830 break;
1831 }
1818 rval = QLA_FUNCTION_FAILED; 1832 rval = QLA_FUNCTION_FAILED;
1819 } else { 1833 } else {
1820 /* Save portname */ 1834 /* Save portname */