aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mvsas
diff options
context:
space:
mode:
authorXiangliang Yu <yuxiangl@marvell.com>2011-09-29 03:32:37 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-10-02 14:09:18 -0400
commit6ceae7c6234f2961dc59912412e8c0706d825873 (patch)
tree1ddbb99ef9109bc5cf6995e61be431c094233c6a /drivers/scsi/mvsas
parent983d3fdd332742167d0482c06fd29cf4b8a687c0 (diff)
[SCSI] mvsas: fix expander link error
Expanders fail to link when the phy rates are mismatched. Signed-off-by: Xiangliang Yu <yuxiangl@marvell.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/mvsas')
-rw-r--r--drivers/scsi/mvsas/mv_sas.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/mvsas/mv_sas.c b/drivers/scsi/mvsas/mv_sas.c
index f2ac01fd09c0..ab2a71fd0fde 100644
--- a/drivers/scsi/mvsas/mv_sas.c
+++ b/drivers/scsi/mvsas/mv_sas.c
@@ -396,7 +396,7 @@ static int mvs_task_prep_smp(struct mvs_info *mvi,
396 /* generate open address frame hdr (first 12 bytes) */ 396 /* generate open address frame hdr (first 12 bytes) */
397 /* initiator, SMP, ftype 1h */ 397 /* initiator, SMP, ftype 1h */
398 buf_oaf[0] = (1 << 7) | (PROTOCOL_SMP << 4) | 0x01; 398 buf_oaf[0] = (1 << 7) | (PROTOCOL_SMP << 4) | 0x01;
399 buf_oaf[1] = dev->linkrate & 0xf; 399 buf_oaf[1] = min(sas_port->linkrate, dev->linkrate) & 0xf;
400 *(u16 *)(buf_oaf + 2) = 0xFFFF; /* SAS SPEC */ 400 *(u16 *)(buf_oaf + 2) = 0xFFFF; /* SAS SPEC */
401 memcpy(buf_oaf + 4, dev->sas_addr, SAS_ADDR_SIZE); 401 memcpy(buf_oaf + 4, dev->sas_addr, SAS_ADDR_SIZE);
402 402
@@ -541,7 +541,7 @@ static int mvs_task_prep_ata(struct mvs_info *mvi,
541 /* generate open address frame hdr (first 12 bytes) */ 541 /* generate open address frame hdr (first 12 bytes) */
542 /* initiator, STP, ftype 1h */ 542 /* initiator, STP, ftype 1h */
543 buf_oaf[0] = (1 << 7) | (PROTOCOL_STP << 4) | 0x1; 543 buf_oaf[0] = (1 << 7) | (PROTOCOL_STP << 4) | 0x1;
544 buf_oaf[1] = dev->linkrate & 0xf; 544 buf_oaf[1] = min(sas_port->linkrate, dev->linkrate) & 0xf;
545 *(u16 *)(buf_oaf + 2) = cpu_to_be16(mvi_dev->device_id + 1); 545 *(u16 *)(buf_oaf + 2) = cpu_to_be16(mvi_dev->device_id + 1);
546 memcpy(buf_oaf + 4, dev->sas_addr, SAS_ADDR_SIZE); 546 memcpy(buf_oaf + 4, dev->sas_addr, SAS_ADDR_SIZE);
547 547
@@ -649,7 +649,7 @@ static int mvs_task_prep_ssp(struct mvs_info *mvi,
649 /* generate open address frame hdr (first 12 bytes) */ 649 /* generate open address frame hdr (first 12 bytes) */
650 /* initiator, SSP, ftype 1h */ 650 /* initiator, SSP, ftype 1h */
651 buf_oaf[0] = (1 << 7) | (PROTOCOL_SSP << 4) | 0x1; 651 buf_oaf[0] = (1 << 7) | (PROTOCOL_SSP << 4) | 0x1;
652 buf_oaf[1] = dev->linkrate & 0xf; 652 buf_oaf[1] = min(sas_port->linkrate, dev->linkrate) & 0xf;
653 *(u16 *)(buf_oaf + 2) = cpu_to_be16(mvi_dev->device_id + 1); 653 *(u16 *)(buf_oaf + 2) = cpu_to_be16(mvi_dev->device_id + 1);
654 memcpy(buf_oaf + 4, dev->sas_addr, SAS_ADDR_SIZE); 654 memcpy(buf_oaf + 4, dev->sas_addr, SAS_ADDR_SIZE);
655 655