aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarish Zunjarrao <harish.zunjarrao@qlogic.com>2009-06-17 13:30:29 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-21 11:52:43 -0400
commit1bb395485160d203a726a19e4fcb1a154748d804 (patch)
treefd6fd3f3c312bf5b7b5e539792095430b752c603
parent27dc9c5a3d652b0d55ab9ab396dcce9f13bc77c3 (diff)
qla2xxx: Correct iiDMA-update calling conventions.
* To set iiDMA speeds for ISP81XX, bits 5-0 are used whereas for other older ISPs bits 2-0 are used. * Pass proper VP index Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com> Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c2
-rw-r--r--drivers/scsi/qla2xxx/qla_mbx.c13
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 262026129325..f2ce8e3cc91b 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -2301,7 +2301,7 @@ qla2x00_iidma_fcport(scsi_qla_host_t *vha, fc_port_t *fcport)
2301 static char *link_speeds[] = { "1", "2", "?", "4", "8", "10" }; 2301 static char *link_speeds[] = { "1", "2", "?", "4", "8", "10" };
2302 char *link_speed; 2302 char *link_speed;
2303 int rval; 2303 int rval;
2304 uint16_t mb[6]; 2304 uint16_t mb[4];
2305 struct qla_hw_data *ha = vha->hw; 2305 struct qla_hw_data *ha = vha->hw;
2306 2306
2307 if (!IS_IIDMA_CAPABLE(ha)) 2307 if (!IS_IIDMA_CAPABLE(ha))
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 451ece0760b0..779ce14e9a2a 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -2697,10 +2697,13 @@ qla2x00_set_idma_speed(scsi_qla_host_t *vha, uint16_t loop_id,
2697 mcp->mb[0] = MBC_PORT_PARAMS; 2697 mcp->mb[0] = MBC_PORT_PARAMS;
2698 mcp->mb[1] = loop_id; 2698 mcp->mb[1] = loop_id;
2699 mcp->mb[2] = BIT_0; 2699 mcp->mb[2] = BIT_0;
2700 mcp->mb[3] = port_speed & (BIT_2|BIT_1|BIT_0); 2700 if (IS_QLA81XX(vha->hw))
2701 mcp->mb[4] = mcp->mb[5] = 0; 2701 mcp->mb[3] = port_speed & (BIT_5|BIT_4|BIT_3|BIT_2|BIT_1|BIT_0);
2702 mcp->out_mb = MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; 2702 else
2703 mcp->in_mb = MBX_5|MBX_4|MBX_3|MBX_1|MBX_0; 2703 mcp->mb[3] = port_speed & (BIT_2|BIT_1|BIT_0);
2704 mcp->mb[9] = vha->vp_idx;
2705 mcp->out_mb = MBX_9|MBX_3|MBX_2|MBX_1|MBX_0;
2706 mcp->in_mb = MBX_3|MBX_1|MBX_0;
2704 mcp->tov = MBX_TOV_SECONDS; 2707 mcp->tov = MBX_TOV_SECONDS;
2705 mcp->flags = 0; 2708 mcp->flags = 0;
2706 rval = qla2x00_mailbox_command(vha, mcp); 2709 rval = qla2x00_mailbox_command(vha, mcp);
@@ -2710,8 +2713,6 @@ qla2x00_set_idma_speed(scsi_qla_host_t *vha, uint16_t loop_id,
2710 mb[0] = mcp->mb[0]; 2713 mb[0] = mcp->mb[0];
2711 mb[1] = mcp->mb[1]; 2714 mb[1] = mcp->mb[1];
2712 mb[3] = mcp->mb[3]; 2715 mb[3] = mcp->mb[3];
2713 mb[4] = mcp->mb[4];
2714 mb[5] = mcp->mb[5];
2715 } 2716 }
2716 2717
2717 if (rval != QLA_SUCCESS) { 2718 if (rval != QLA_SUCCESS) {