diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gs.c | 18 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 2 |
3 files changed, 20 insertions, 2 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index c4fc40f8e8ca..2c10130d9e03 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -1602,6 +1602,7 @@ typedef struct fc_port { | |||
1602 | 1602 | ||
1603 | #define CT_REJECT_RESPONSE 0x8001 | 1603 | #define CT_REJECT_RESPONSE 0x8001 |
1604 | #define CT_ACCEPT_RESPONSE 0x8002 | 1604 | #define CT_ACCEPT_RESPONSE 0x8002 |
1605 | #define CT_REASON_INVALID_COMMAND_CODE 0x01 | ||
1605 | #define CT_REASON_CANNOT_PERFORM 0x09 | 1606 | #define CT_REASON_CANNOT_PERFORM 0x09 |
1606 | #define CT_EXPL_ALREADY_REGISTERED 0x10 | 1607 | #define CT_EXPL_ALREADY_REGISTERED 0x10 |
1607 | 1608 | ||
@@ -2079,6 +2080,7 @@ typedef struct scsi_qla_host { | |||
2079 | uint32_t msi_enabled :1; | 2080 | uint32_t msi_enabled :1; |
2080 | uint32_t msix_enabled :1; | 2081 | uint32_t msix_enabled :1; |
2081 | uint32_t disable_serdes :1; | 2082 | uint32_t disable_serdes :1; |
2083 | uint32_t gpsc_supported :1; | ||
2082 | } flags; | 2084 | } flags; |
2083 | 2085 | ||
2084 | atomic_t loop_state; | 2086 | atomic_t loop_state; |
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 */ |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index d3b6df4d55c8..79115c1f2494 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -475,6 +475,8 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
475 | set_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); | 475 | set_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); |
476 | } | 476 | } |
477 | set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags); | 477 | set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags); |
478 | |||
479 | ha->flags.gpsc_supported = 1; | ||
478 | break; | 480 | break; |
479 | 481 | ||
480 | case MBA_CHG_IN_CONNECTION: /* Change in connection mode */ | 482 | case MBA_CHG_IN_CONNECTION: /* Change in connection mode */ |