if (!capable(CAP_SYS_ADMIN))
                return -EINVAL;
 
-       if (IS_NOCACHE_VPD_TYPE(ha))
+       if (!IS_NOCACHE_VPD_TYPE(ha))
                goto skip;
 
        faddr = ha->flt_region_vpd << 2;
                ql_log(ql_log_info, vha, 0x706f,
                    "Issuing MPI reset.\n");
 
-               if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
+               if (IS_QLA83XX(ha)) {
                        uint32_t idc_control;
 
                        qla83xx_idc_lock(vha, 0);
                        continue;
                if (iter->type == 3 && !(IS_CNA_CAPABLE(ha)))
                        continue;
-               if (iter->type == 0x27 &&
-                   (!IS_QLA27XX(ha) || !IS_QLA28XX(ha)))
-                       continue;
 
                sysfs_remove_bin_file(&host->shost_gendev.kobj,
                    iter->attr);
 
                mem_size = (ha->fw_memory_size - 0x11000 + 1) *
                    sizeof(uint16_t);
        } else if (IS_FWI2_CAPABLE(ha)) {
-               if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha))
+               if (IS_QLA83XX(ha))
                        fixed_size = offsetof(struct qla83xx_fw_dump, ext_mem);
                else if (IS_QLA81XX(ha))
                        fixed_size = offsetof(struct qla81xx_fw_dump, ext_mem);
                mem_size = (ha->fw_memory_size - 0x100000 + 1) *
                    sizeof(uint32_t);
                if (ha->mqenable) {
-                       if (!IS_QLA83XX(ha) && !IS_QLA27XX(ha) &&
-                           !IS_QLA28XX(ha))
+                       if (!IS_QLA83XX(ha))
                                mq_size = sizeof(struct qla2xxx_mq_chain);
                        /*
                         * Allocate maximum buffer size for all queues - Q0.
                            ha->fw_major_version, ha->fw_minor_version,
                            ha->fw_subminor_version);
 
-                       if (IS_QLA83XX(ha) || IS_QLA27XX(ha) ||
-                           IS_QLA28XX(ha)) {
+                       if (IS_QLA83XX(ha)) {
                                ha->flags.fac_supported = 0;
                                rval = QLA_SUCCESS;
                        }
 
 #include <linux/delay.h>
 #include <linux/gfp.h>
 
+#ifdef CONFIG_PPC
+#define IS_PPCARCH      true
+#else
+#define IS_PPCARCH      false
+#endif
+
 static struct mb_cmd_name {
        uint16_t cmd;
        const char *str;
                                vha->min_supported_speed =
                                    nv->min_supported_speed;
                        }
+
+                       if (IS_PPCARCH)
+                               mcp->mb[11] |= BIT_4;
                }
 
                if (ha->flags.exlogins_enabled)
                ha->orig_fw_iocb_count = mcp->mb[10];
                if (ha->flags.npiv_supported)
                        ha->max_npiv_vports = mcp->mb[11];
-               if (IS_QLA81XX(ha) || IS_QLA83XX(ha) || IS_QLA27XX(ha) ||
-                   IS_QLA28XX(ha))
+               if (IS_QLA81XX(ha) || IS_QLA83XX(ha))
                        ha->fw_max_fcf_count = mcp->mb[12];
        }
 
        mcp->out_mb = MBX_1|MBX_0;
        mcp->in_mb = MBX_2|MBX_1|MBX_0;
        if (IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha))
-               mcp->in_mb |= MBX_3;
+               mcp->in_mb |= MBX_4|MBX_3;
        mcp->tov = MBX_TOV_SECONDS;
        mcp->flags = 0;
        rval = qla2x00_mailbox_command(vha, mcp);
 
                if (ha->mqiobase)
                        iounmap(ha->mqiobase);
 
-               if ((IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) &&
-                   ha->msixbase)
+               if (ha->msixbase)
                        iounmap(ha->msixbase);
        }
 }
 
                                ha->flt_region_nvram = start;
                        break;
                case FLT_REG_IMG_PRI_27XX:
-                       if (IS_QLA27XX(ha) && !IS_QLA28XX(ha))
+                       if (IS_QLA27XX(ha) || IS_QLA28XX(ha))
                                ha->flt_region_img_status_pri = start;
                        break;
                case FLT_REG_IMG_SEC_27XX:
                    flash_data_addr(ha, faddr), le32_to_cpu(*dwptr));
                if (ret) {
                        ql_dbg(ql_dbg_user, vha, 0x7006,
-                           "Failed slopw write %x (%x)\n", faddr, *dwptr);
+                           "Failed slow write %x (%x)\n", faddr, *dwptr);
                        break;
                }
        }
 
        if (!QLA_TGT_MODE_ENABLED())
                return;
 
-       if  ((ql2xenablemsix == 0) || IS_QLA83XX(ha) || IS_QLA27XX(ha) ||
-           IS_QLA28XX(ha)) {
+       if  (ha->mqenable || IS_QLA83XX(ha) || IS_QLA27XX(ha) || IS_QLA28XX(ha)) {
                ISP_ATIO_Q_IN(base_vha) = &ha->mqiobase->isp25mq.atio_q_in;
                ISP_ATIO_Q_OUT(base_vha) = &ha->mqiobase->isp25mq.atio_q_out;
        } else {