Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1561924
| From | John Garry <john.garry@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4/7] scsi: hisi_sas: modify hard reset for directed-attached disk |
| Date | 2017-01-18 17:10 +0100 |
| Message-ID | <t10Yb-6eP-45@gated-at.bofh.it> (permalink) |
| References | <t10Ya-6eP-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Xiang Chen <chenxiang66@hisilicon.com>
Correctly set registers in v2 for root PHY hardreset for directly
attached disk.
Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
---
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
index 452e329..7519772 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
@@ -207,6 +207,8 @@
#define TXID_AUTO (PORT_BASE + 0xb8)
#define TXID_AUTO_CT3_OFF 1
#define TXID_AUTO_CT3_MSK (0x1 << TXID_AUTO_CT3_OFF)
+#define TX_HARDRST_OFF 2
+#define TX_HARDRST_MSK (0x1 << TX_HARDRST_OFF)
#define RX_IDAF_DWORD0 (PORT_BASE + 0xc4)
#define RX_IDAF_DWORD1 (PORT_BASE + 0xc8)
#define RX_IDAF_DWORD2 (PORT_BASE + 0xcc)
@@ -1075,7 +1077,15 @@ static void stop_phy_v2_hw(struct hisi_hba *hisi_hba, int phy_no)
static void phy_hard_reset_v2_hw(struct hisi_hba *hisi_hba, int phy_no)
{
+ struct hisi_sas_phy *phy = &hisi_hba->phy[phy_no];
+ u32 txid_auto;
+
stop_phy_v2_hw(hisi_hba, phy_no);
+ if (phy->identify.device_type == SAS_END_DEVICE) {
+ txid_auto = hisi_sas_phy_read32(hisi_hba, phy_no, TXID_AUTO);
+ hisi_sas_phy_write32(hisi_hba, phy_no, TXID_AUTO,
+ txid_auto | TX_HARDRST_MSK);
+ }
msleep(100);
start_phy_v2_hw(hisi_hba, phy_no);
}
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/7] hisi_sas: SATA IO workaround and other misc patches John Garry <john.garry@huawei.com> - 2017-01-18 17:10 +0100
[PATCH 3/7] scsi: hisi_sas: downgrade refclk message John Garry <john.garry@huawei.com> - 2017-01-18 17:10 +0100
Re: [PATCH 3/7] scsi: hisi_sas: downgrade refclk message Johannes Thumshirn <jthumshirn@suse.de> - 2017-01-19 09:50 +0100
[PATCH 4/7] scsi: hisi_sas: modify hard reset for directed-attached disk John Garry <john.garry@huawei.com> - 2017-01-18 17:10 +0100
Re: [PATCH 4/7] scsi: hisi_sas: modify hard reset for directed-attached disk Johannes Thumshirn <jthumshirn@suse.de> - 2017-01-19 10:10 +0100
[PATCH 5/7] scsi: hisi_sas: downgrade internal abort exit print John Garry <john.garry@huawei.com> - 2017-01-18 17:10 +0100
Re: [PATCH 5/7] scsi: hisi_sas: downgrade internal abort exit print Johannes Thumshirn <jthumshirn@suse.de> - 2017-01-19 10:10 +0100
[PATCH 6/7] scsi: hisi_sas: fix probe ordering problem John Garry <john.garry@huawei.com> - 2017-01-18 17:10 +0100
Re: [PATCH 6/7] scsi: hisi_sas: fix probe ordering problem Johannes Thumshirn <jthumshirn@suse.de> - 2017-01-19 10:00 +0100
[PATCH 7/7] scsi: hisi_sas: decrease running_req in hisi_sas_slot_task_free() John Garry <john.garry@huawei.com> - 2017-01-18 17:10 +0100
Re: [PATCH 7/7] scsi: hisi_sas: decrease running_req in hisi_sas_slot_task_free() Johannes Thumshirn <jthumshirn@suse.de> - 2017-01-19 10:00 +0100
csiph-web