Merge branches 'pxa-ian' and 'pxa-xm270' into pxa
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / scsi / qla2xxx / qla_mbx.c
index 2100604208096f2b3e04d0cb1001614ffbcb7aa8..250d2f604397b02aca0840e5a8b4100f2378cb63 100644 (file)
@@ -2303,8 +2303,6 @@ qla24xx_lun_reset(struct fc_port *fcport, unsigned int l)
        return __qla24xx_issue_tmf("Lun", TCF_LUN_RESET, fcport, l);
 }
 
-#if 0
-
 int
 qla2x00_system_error(scsi_qla_host_t *ha)
 {
@@ -2312,7 +2310,7 @@ qla2x00_system_error(scsi_qla_host_t *ha)
        mbx_cmd_t mc;
        mbx_cmd_t *mcp = &mc;
 
-       if (!IS_FWI2_CAPABLE(ha))
+       if (!IS_QLA23XX(ha) && !IS_FWI2_CAPABLE(ha))
                return QLA_FUNCTION_FAILED;
 
        DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no));
@@ -2334,8 +2332,6 @@ qla2x00_system_error(scsi_qla_host_t *ha)
        return rval;
 }
 
-#endif  /*  0  */
-
 /**
  * qla2x00_set_serdes_params() -
  * @ha: HA context
@@ -2508,7 +2504,7 @@ qla2x00_enable_fce_trace(scsi_qla_host_t *ha, dma_addr_t fce_dma,
                if (mb)
                        memcpy(mb, mcp->mb, 8 * sizeof(*mb));
                if (dwords)
-                       *dwords = mcp->mb[6];
+                       *dwords = buffers;
        }
 
        return rval;
@@ -2807,9 +2803,9 @@ qla24xx_control_vp(scsi_qla_host_t *vha, int cmd)
         */
        map = (vp_index - 1) / 8;
        pos = (vp_index - 1) & 7;
-       down(&ha->vport_sem);
+       mutex_lock(&ha->vport_lock);
        vce->vp_idx_map[map] |= 1 << pos;
-       up(&ha->vport_sem);
+       mutex_unlock(&ha->vport_lock);
 
        rval = qla2x00_issue_iocb(ha, vce, vce_dma, 0);
        if (rval != QLA_SUCCESS) {