diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 800751ab562a..e8755ab86b6a 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -1471,6 +1471,9 @@ qla2x00_optrom_gold_fw_version_show(struct device *dev, scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); struct qla_hw_data *ha = vha->hw; + if (IS_QLA29XX(ha)) + return -EPERM; + if (!IS_QLA81XX(ha) && !IS_QLA83XX(ha) && !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) return scnprintf(buf, PAGE_SIZE, "\n"); @@ -1499,6 +1502,9 @@ qla24xx_84xx_fw_version_show(struct device *dev, scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); struct qla_hw_data *ha = vha->hw; + if (IS_QLA29XX(ha)) + return -EPERM; + if (!IS_QLA84XX(ha)) return scnprintf(buf, PAGE_SIZE, "\n"); @@ -1565,6 +1571,9 @@ qla2x00_flash_block_size_show(struct device *dev, scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); struct qla_hw_data *ha = vha->hw; + if (IS_QLA29XX(ha)) + return -EPERM; + return scnprintf(buf, PAGE_SIZE, "0x%x\n", ha->fdt_block_size); } @@ -1573,6 +1582,10 @@ qla2x00_vlan_id_show(struct device *dev, struct device_attribute *attr, char *buf) { scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); + struct qla_hw_data *ha = vha->hw; + + if (IS_QLA29XX(ha)) + return -EPERM; if (!IS_CNA_CAPABLE(vha->hw)) return scnprintf(buf, PAGE_SIZE, "\n"); @@ -1585,6 +1598,10 @@ qla2x00_vn_port_mac_address_show(struct device *dev, struct device_attribute *attr, char *buf) { scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); + struct qla_hw_data *ha = vha->hw; + + if (IS_QLA29XX(ha)) + return -EPERM; if (!IS_CNA_CAPABLE(vha->hw)) return scnprintf(buf, PAGE_SIZE, "\n"); @@ -1716,6 +1733,10 @@ qla2x00_allow_cna_fw_dump_show(struct device *dev, struct device_attribute *attr, char *buf) { scsi_qla_host_t *vha = shost_priv(class_to_shost(dev)); + struct qla_hw_data *ha = vha->hw; + + if (IS_QLA29XX(ha)) + return -EPERM; if (!IS_P3P_TYPE(vha->hw)) return scnprintf(buf, PAGE_SIZE, "\n");