mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: <jejb@linux.vnet.ibm.com>, <martin.petersen@oracle.com>
Cc: <linuxarm@huawei.com>, <john.garry2@mail.dcu.ie>,
	<linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	John Garry <john.garry@huawei.com>
Subject: [PATCH 1/5] hisi_sas: use device linkrate in MCR for v2 hw
Date: Fri, 8 Apr 2016 17:23:11 +0800	[thread overview]
Message-ID: <1460107395-24501-2-git-send-email-john.garry@huawei.com> (raw)
In-Reply-To: <1460107395-24501-1-git-send-email-john.garry@huawei.com>

Contrary to the field name, the MCR (max connection rate)
in the ITCT should hold the device linkrate (linkrate of
the connected phy), and not the max linkrate.

This fixes an issue seen where some SATA drives connected
through an expander which would not attach.

Signed-off-by: John Garry <john.garry@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
index b733747..f462fc4 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
@@ -544,7 +544,7 @@ static void setup_itct_v2_hw(struct hisi_hba *hisi_hba,
 	}
 
 	qw0 |= ((1 << ITCT_HDR_VALID_OFF) |
-		(device->max_linkrate << ITCT_HDR_MCR_OFF) |
+		(device->linkrate << ITCT_HDR_MCR_OFF) |
 		(1 << ITCT_HDR_VLN_OFF) |
 		(port->id << ITCT_HDR_PORT_ID_OFF));
 	itct->qw0 = cpu_to_le64(qw0);
-- 
1.9.1

  reply	other threads:[~2016-04-08  9:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-08  9:23 [PATCH 0/5] hisi_sas: v2 hw SATA fixes John Garry
2016-04-08  9:23 ` John Garry [this message]
2016-04-08  9:23 ` [PATCH 2/5] hisi_sas: fix v2 hw multiple SATA disk issue John Garry
2016-04-08  9:23 ` [PATCH 3/5] hisi_sas: add v2 hw support for >4 SATA phys John Garry
2016-04-08  9:23 ` [PATCH 4/5] hisi_sas: for v2 hw only set ITCT qw2 for SAS device John Garry
2016-04-08  9:23 ` [PATCH 5/5] hisi_sas: update driver version to 1.4 John Garry
2016-04-12  2:14 ` [PATCH 0/5] hisi_sas: v2 hw SATA fixes Martin K. Petersen
2016-04-13  9:28 ` Zhangfei Gao
2016-04-15  2:20 ` Martin K. Petersen
2016-04-15  8:04   ` John Garry
2016-04-15 20:15     ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460107395-24501-2-git-send-email-john.garry@huawei.com \
    --to=john.garry@huawei.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=john.garry2@mail.dcu.ie \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome