aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-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