All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] hisi_sas v1 hw itct fixes
@ 2015-12-21 11:35 ` John Garry
  0 siblings, 0 replies; 16+ messages in thread
From: John Garry @ 2015-12-21 11:35 UTC (permalink / raw)
  To: JBottomley, martin.petersen
  Cc: linuxarm, zhangfei.gao, xuwei5, john.garry2, linux-scsi,
	linux-kernel, John Garry

This patchset introduces some minor fixes for v1 hw
itct configuration.

John Garry (3):
  hisi_sas: fix v1 itct masks
  hisi_sas: fix typo in setup_itct_v1_hw()
  hisi_sas: use u64 for qw0 in free_device_v1_hw()

 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 40 +++++++++++++++-------------------
 1 file changed, 18 insertions(+), 22 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 0/3] hisi_sas v1 hw itct fixes
@ 2015-12-21 11:35 ` John Garry
  0 siblings, 0 replies; 16+ messages in thread
From: John Garry @ 2015-12-21 11:35 UTC (permalink / raw)
  To: JBottomley, martin.petersen
  Cc: linuxarm, zhangfei.gao, xuwei5, john.garry2, linux-scsi,
	linux-kernel, John Garry

This patchset introduces some minor fixes for v1 hw
itct configuration.

John Garry (3):
  hisi_sas: fix v1 itct masks
  hisi_sas: fix typo in setup_itct_v1_hw()
  hisi_sas: use u64 for qw0 in free_device_v1_hw()

 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 40 +++++++++++++++-------------------
 1 file changed, 18 insertions(+), 22 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH 1/3] hisi_sas: fix v1 itct masks
  2015-12-21 11:35 ` John Garry
@ 2015-12-21 11:35   ` John Garry
  -1 siblings, 0 replies; 16+ messages in thread
From: John Garry @ 2015-12-21 11:35 UTC (permalink / raw)
  To: JBottomley, martin.petersen
  Cc: linuxarm, zhangfei.gao, xuwei5, john.garry2, linux-scsi,
	linux-kernel, John Garry

The mask fields are for quad-words, so add ULL suffix.
Also unreferenced ITCT_HDR_BREAK_REPLY and
ITCT_HDR_MAX_BURST are removed.

Fixes: 50af155b6c ("hisi_sas: Add v1 hardware reg")

Signed-off-by: John Garry <john.garry@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
index d543811..0af682c 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -247,41 +247,36 @@
 /* ITCT header */
 /* qw0 */
 #define ITCT_HDR_DEV_TYPE_OFF		0
-#define ITCT_HDR_DEV_TYPE_MSK		(0x3 << ITCT_HDR_DEV_TYPE_OFF)
+#define ITCT_HDR_DEV_TYPE_MSK		(0x3ULL << ITCT_HDR_DEV_TYPE_OFF)
 #define ITCT_HDR_VALID_OFF		2
-#define ITCT_HDR_VALID_MSK		(0x1 << ITCT_HDR_VALID_OFF)
-#define ITCT_HDR_BREAK_REPLY_ENA_OFF	3
-#define ITCT_HDR_BREAK_REPLY_ENA_MSK	(0x1 << ITCT_HDR_BREAK_REPLY_ENA_OFF)
+#define ITCT_HDR_VALID_MSK		(0x1ULL << ITCT_HDR_VALID_OFF)
 #define ITCT_HDR_AWT_CONTROL_OFF	4
-#define ITCT_HDR_AWT_CONTROL_MSK	(0x1 << ITCT_HDR_AWT_CONTROL_OFF)
+#define ITCT_HDR_AWT_CONTROL_MSK	(0x1ULL << ITCT_HDR_AWT_CONTROL_OFF)
 #define ITCT_HDR_MAX_CONN_RATE_OFF	5
-#define ITCT_HDR_MAX_CONN_RATE_MSK	(0xf << ITCT_HDR_MAX_CONN_RATE_OFF)
+#define ITCT_HDR_MAX_CONN_RATE_MSK	(0xfULL << ITCT_HDR_MAX_CONN_RATE_OFF)
 #define ITCT_HDR_VALID_LINK_NUM_OFF	9
-#define ITCT_HDR_VALID_LINK_NUM_MSK	(0xf << ITCT_HDR_VALID_LINK_NUM_OFF)
+#define ITCT_HDR_VALID_LINK_NUM_MSK	(0xfULL << ITCT_HDR_VALID_LINK_NUM_OFF)
 #define ITCT_HDR_PORT_ID_OFF		13
-#define ITCT_HDR_PORT_ID_MSK		(0x7 << ITCT_HDR_PORT_ID_OFF)
+#define ITCT_HDR_PORT_ID_MSK		(0x7ULL << ITCT_HDR_PORT_ID_OFF)
 #define ITCT_HDR_SMP_TIMEOUT_OFF	16
-#define ITCT_HDR_SMP_TIMEOUT_MSK	(0xffff << ITCT_HDR_SMP_TIMEOUT_OFF)
-#define ITCT_HDR_MAX_BURST_BYTES_OFF	16
-#define ITCT_HDR_MAX_BURST_BYTES_MSK	(0xffffffff << \
-					ITCT_MAX_BURST_BYTES_OFF)
+#define ITCT_HDR_SMP_TIMEOUT_MSK	(0xffffULL << ITCT_HDR_SMP_TIMEOUT_OFF)
 /* qw1 */
 #define ITCT_HDR_MAX_SAS_ADDR_OFF	0
 #define ITCT_HDR_MAX_SAS_ADDR_MSK	(0xffffffffffffffff << \
 					ITCT_HDR_MAX_SAS_ADDR_OFF)
 /* qw2 */
 #define ITCT_HDR_IT_NEXUS_LOSS_TL_OFF	0
-#define ITCT_HDR_IT_NEXUS_LOSS_TL_MSK	(0xffff << \
+#define ITCT_HDR_IT_NEXUS_LOSS_TL_MSK	(0xffffULL << \
 					ITCT_HDR_IT_NEXUS_LOSS_TL_OFF)
 #define ITCT_HDR_BUS_INACTIVE_TL_OFF	16
-#define ITCT_HDR_BUS_INACTIVE_TL_MSK	(0xffff << \
+#define ITCT_HDR_BUS_INACTIVE_TL_MSK	(0xffffULL << \
 					ITCT_HDR_BUS_INACTIVE_TL_OFF)
 #define ITCT_HDR_MAX_CONN_TL_OFF	32
-#define ITCT_HDR_MAX_CONN_TL_MSK	(0xffff << \
+#define ITCT_HDR_MAX_CONN_TL_MSK	(0xffffULL << \
 					ITCT_HDR_MAX_CONN_TL_OFF)
 #define ITCT_HDR_REJ_OPEN_TL_OFF	48
-#define ITCT_HDR_REJ_OPEN_TL_MSK	(0xffff << \
-					ITCT_REJ_OPEN_TL_OFF)
+#define ITCT_HDR_REJ_OPEN_TL_MSK	(0xffffULL << \
+					ITCT_HDR_REJ_OPEN_TL_OFF)
 
 /* Err record header */
 #define ERR_HDR_DMA_TX_ERR_TYPE_OFF	0
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 1/3] hisi_sas: fix v1 itct masks
@ 2015-12-21 11:35   ` John Garry
  0 siblings, 0 replies; 16+ messages in thread
From: John Garry @ 2015-12-21 11:35 UTC (permalink / raw)
  To: JBottomley, martin.petersen
  Cc: linuxarm, zhangfei.gao, xuwei5, john.garry2, linux-scsi,
	linux-kernel, John Garry

The mask fields are for quad-words, so add ULL suffix.
Also unreferenced ITCT_HDR_BREAK_REPLY and
ITCT_HDR_MAX_BURST are removed.

Fixes: 50af155b6c ("hisi_sas: Add v1 hardware reg")

Signed-off-by: John Garry <john.garry@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
index d543811..0af682c 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -247,41 +247,36 @@
 /* ITCT header */
 /* qw0 */
 #define ITCT_HDR_DEV_TYPE_OFF		0
-#define ITCT_HDR_DEV_TYPE_MSK		(0x3 << ITCT_HDR_DEV_TYPE_OFF)
+#define ITCT_HDR_DEV_TYPE_MSK		(0x3ULL << ITCT_HDR_DEV_TYPE_OFF)
 #define ITCT_HDR_VALID_OFF		2
-#define ITCT_HDR_VALID_MSK		(0x1 << ITCT_HDR_VALID_OFF)
-#define ITCT_HDR_BREAK_REPLY_ENA_OFF	3
-#define ITCT_HDR_BREAK_REPLY_ENA_MSK	(0x1 << ITCT_HDR_BREAK_REPLY_ENA_OFF)
+#define ITCT_HDR_VALID_MSK		(0x1ULL << ITCT_HDR_VALID_OFF)
 #define ITCT_HDR_AWT_CONTROL_OFF	4
-#define ITCT_HDR_AWT_CONTROL_MSK	(0x1 << ITCT_HDR_AWT_CONTROL_OFF)
+#define ITCT_HDR_AWT_CONTROL_MSK	(0x1ULL << ITCT_HDR_AWT_CONTROL_OFF)
 #define ITCT_HDR_MAX_CONN_RATE_OFF	5
-#define ITCT_HDR_MAX_CONN_RATE_MSK	(0xf << ITCT_HDR_MAX_CONN_RATE_OFF)
+#define ITCT_HDR_MAX_CONN_RATE_MSK	(0xfULL << ITCT_HDR_MAX_CONN_RATE_OFF)
 #define ITCT_HDR_VALID_LINK_NUM_OFF	9
-#define ITCT_HDR_VALID_LINK_NUM_MSK	(0xf << ITCT_HDR_VALID_LINK_NUM_OFF)
+#define ITCT_HDR_VALID_LINK_NUM_MSK	(0xfULL << ITCT_HDR_VALID_LINK_NUM_OFF)
 #define ITCT_HDR_PORT_ID_OFF		13
-#define ITCT_HDR_PORT_ID_MSK		(0x7 << ITCT_HDR_PORT_ID_OFF)
+#define ITCT_HDR_PORT_ID_MSK		(0x7ULL << ITCT_HDR_PORT_ID_OFF)
 #define ITCT_HDR_SMP_TIMEOUT_OFF	16
-#define ITCT_HDR_SMP_TIMEOUT_MSK	(0xffff << ITCT_HDR_SMP_TIMEOUT_OFF)
-#define ITCT_HDR_MAX_BURST_BYTES_OFF	16
-#define ITCT_HDR_MAX_BURST_BYTES_MSK	(0xffffffff << \
-					ITCT_MAX_BURST_BYTES_OFF)
+#define ITCT_HDR_SMP_TIMEOUT_MSK	(0xffffULL << ITCT_HDR_SMP_TIMEOUT_OFF)
 /* qw1 */
 #define ITCT_HDR_MAX_SAS_ADDR_OFF	0
 #define ITCT_HDR_MAX_SAS_ADDR_MSK	(0xffffffffffffffff << \
 					ITCT_HDR_MAX_SAS_ADDR_OFF)
 /* qw2 */
 #define ITCT_HDR_IT_NEXUS_LOSS_TL_OFF	0
-#define ITCT_HDR_IT_NEXUS_LOSS_TL_MSK	(0xffff << \
+#define ITCT_HDR_IT_NEXUS_LOSS_TL_MSK	(0xffffULL << \
 					ITCT_HDR_IT_NEXUS_LOSS_TL_OFF)
 #define ITCT_HDR_BUS_INACTIVE_TL_OFF	16
-#define ITCT_HDR_BUS_INACTIVE_TL_MSK	(0xffff << \
+#define ITCT_HDR_BUS_INACTIVE_TL_MSK	(0xffffULL << \
 					ITCT_HDR_BUS_INACTIVE_TL_OFF)
 #define ITCT_HDR_MAX_CONN_TL_OFF	32
-#define ITCT_HDR_MAX_CONN_TL_MSK	(0xffff << \
+#define ITCT_HDR_MAX_CONN_TL_MSK	(0xffffULL << \
 					ITCT_HDR_MAX_CONN_TL_OFF)
 #define ITCT_HDR_REJ_OPEN_TL_OFF	48
-#define ITCT_HDR_REJ_OPEN_TL_MSK	(0xffff << \
-					ITCT_REJ_OPEN_TL_OFF)
+#define ITCT_HDR_REJ_OPEN_TL_MSK	(0xffffULL << \
+					ITCT_HDR_REJ_OPEN_TL_OFF)
 
 /* Err record header */
 #define ERR_HDR_DMA_TX_ERR_TYPE_OFF	0
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/3] hisi_sas: fix typo in setup_itct_v1_hw()
  2015-12-21 11:35 ` John Garry
@ 2015-12-21 11:35   ` John Garry
  -1 siblings, 0 replies; 16+ messages in thread
From: John Garry @ 2015-12-21 11:35 UTC (permalink / raw)
  To: JBottomley, martin.petersen
  Cc: linuxarm, zhangfei.gao, xuwei5, john.garry2, linux-scsi,
	linux-kernel, John Garry

We were doing a arithmetic comparison instead
of logical shift by accident.
Mis-programming the itct did not seem to make
a difference to operation.

Fixes: abda97c2fe874 ("hisi_sas: Add dev_found")

Signed-off-by: John Garry <john.garry@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
index 0af682c..38ff575 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -528,10 +528,10 @@ static void setup_itct_v1_hw(struct hisi_hba *hisi_hba,
 	itct->sas_addr = __swab64(itct->sas_addr);
 
 	/* qw2 */
-	itct->qw2 = cpu_to_le64((500 < ITCT_HDR_IT_NEXUS_LOSS_TL_OFF) |
-				(0xff00 < ITCT_HDR_BUS_INACTIVE_TL_OFF) |
-				(0xff00 < ITCT_HDR_MAX_CONN_TL_OFF) |
-				(0xff00 < ITCT_HDR_REJ_OPEN_TL_OFF));
+	itct->qw2 = cpu_to_le64((500ULL << ITCT_HDR_IT_NEXUS_LOSS_TL_OFF) |
+				(0xff00ULL << ITCT_HDR_BUS_INACTIVE_TL_OFF) |
+				(0xff00ULL << ITCT_HDR_MAX_CONN_TL_OFF) |
+				(0xff00ULL << ITCT_HDR_REJ_OPEN_TL_OFF));
 }
 
 static void free_device_v1_hw(struct hisi_hba *hisi_hba,
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 2/3] hisi_sas: fix typo in setup_itct_v1_hw()
@ 2015-12-21 11:35   ` John Garry
  0 siblings, 0 replies; 16+ messages in thread
From: John Garry @ 2015-12-21 11:35 UTC (permalink / raw)
  To: JBottomley, martin.petersen
  Cc: linuxarm, zhangfei.gao, xuwei5, john.garry2, linux-scsi,
	linux-kernel, John Garry

We were doing a arithmetic comparison instead
of logical shift by accident.
Mis-programming the itct did not seem to make
a difference to operation.

Fixes: abda97c2fe874 ("hisi_sas: Add dev_found")

Signed-off-by: John Garry <john.garry@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
index 0af682c..38ff575 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -528,10 +528,10 @@ static void setup_itct_v1_hw(struct hisi_hba *hisi_hba,
 	itct->sas_addr = __swab64(itct->sas_addr);
 
 	/* qw2 */
-	itct->qw2 = cpu_to_le64((500 < ITCT_HDR_IT_NEXUS_LOSS_TL_OFF) |
-				(0xff00 < ITCT_HDR_BUS_INACTIVE_TL_OFF) |
-				(0xff00 < ITCT_HDR_MAX_CONN_TL_OFF) |
-				(0xff00 < ITCT_HDR_REJ_OPEN_TL_OFF));
+	itct->qw2 = cpu_to_le64((500ULL << ITCT_HDR_IT_NEXUS_LOSS_TL_OFF) |
+				(0xff00ULL << ITCT_HDR_BUS_INACTIVE_TL_OFF) |
+				(0xff00ULL << ITCT_HDR_MAX_CONN_TL_OFF) |
+				(0xff00ULL << ITCT_HDR_REJ_OPEN_TL_OFF));
 }
 
 static void free_device_v1_hw(struct hisi_hba *hisi_hba,
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/3] hisi_sas: use u64 for qw0 in free_device_v1_hw()
  2015-12-21 11:35 ` John Garry
@ 2015-12-21 11:35   ` John Garry
  -1 siblings, 0 replies; 16+ messages in thread
From: John Garry @ 2015-12-21 11:35 UTC (permalink / raw)
  To: JBottomley, martin.petersen
  Cc: linuxarm, zhangfei.gao, xuwei5, john.garry2, linux-scsi,
	linux-kernel, John Garry

By reading in itct.qw0 into a 32b variable the top
32 bits were being lost.
In practice this was OK as they were zeroes.

Fixes: 27a3f229 ("hisi_sas: Add cq interrupt")

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

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
index 38ff575..057fdeb 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -539,7 +539,8 @@ static void free_device_v1_hw(struct hisi_hba *hisi_hba,
 {
 	u64 dev_id = sas_dev->device_id;
 	struct hisi_sas_itct *itct = &hisi_hba->itct[dev_id];
-	u32 qw0, reg_val = hisi_sas_read32(hisi_hba, CFG_AGING_TIME);
+	u64 qw0;
+	u32 reg_val = hisi_sas_read32(hisi_hba, CFG_AGING_TIME);
 
 	reg_val |= CFG_AGING_TIME_ITCT_REL_MSK;
 	hisi_sas_write32(hisi_hba, CFG_AGING_TIME, reg_val);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH 3/3] hisi_sas: use u64 for qw0 in free_device_v1_hw()
@ 2015-12-21 11:35   ` John Garry
  0 siblings, 0 replies; 16+ messages in thread
From: John Garry @ 2015-12-21 11:35 UTC (permalink / raw)
  To: JBottomley, martin.petersen
  Cc: linuxarm, zhangfei.gao, xuwei5, john.garry2, linux-scsi,
	linux-kernel, John Garry

By reading in itct.qw0 into a 32b variable the top
32 bits were being lost.
In practice this was OK as they were zeroes.

Fixes: 27a3f229 ("hisi_sas: Add cq interrupt")

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

diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
index 38ff575..057fdeb 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
@@ -539,7 +539,8 @@ static void free_device_v1_hw(struct hisi_hba *hisi_hba,
 {
 	u64 dev_id = sas_dev->device_id;
 	struct hisi_sas_itct *itct = &hisi_hba->itct[dev_id];
-	u32 qw0, reg_val = hisi_sas_read32(hisi_hba, CFG_AGING_TIME);
+	u64 qw0;
+	u32 reg_val = hisi_sas_read32(hisi_hba, CFG_AGING_TIME);
 
 	reg_val |= CFG_AGING_TIME_ITCT_REL_MSK;
 	hisi_sas_write32(hisi_hba, CFG_AGING_TIME, reg_val);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* RE: [PATCH 3/3] hisi_sas: use u64 for qw0 in free_device_v1_hw()
  2015-12-21 11:35   ` John Garry
  (?)
@ 2016-01-08  4:29   ` Seymour, Shane M
  -1 siblings, 0 replies; 16+ messages in thread
From: Seymour, Shane M @ 2016-01-08  4:29 UTC (permalink / raw)
  To: John Garry, JBottomley, martin.petersen
  Cc: linuxarm, zhangfei.gao, xuwei5, john.garry2, linux-scsi, linux-kernel

> By reading in itct.qw0 into a 32b variable the top
> 32 bits were being lost.
> In practice this was OK as they were zeroes.
> 
> Fixes: 27a3f229 ("hisi_sas: Add cq interrupt")
> 
> Signed-off-by: John Garry <john.garry@huawei.com>

Reviewed-by: Shane Seymour <shane.seymour@hpe.com> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [PATCH 2/3] hisi_sas: fix typo in setup_itct_v1_hw()
  2015-12-21 11:35   ` John Garry
  (?)
@ 2016-01-08  4:30   ` Seymour, Shane M
  -1 siblings, 0 replies; 16+ messages in thread
From: Seymour, Shane M @ 2016-01-08  4:30 UTC (permalink / raw)
  To: John Garry, JBottomley, martin.petersen
  Cc: linuxarm, zhangfei.gao, xuwei5, john.garry2, linux-scsi, linux-kernel


> We were doing a arithmetic comparison instead of logical shift by accident.
> Mis-programming the itct did not seem to make a difference to operation.
> 
> Fixes: abda97c2fe874 ("hisi_sas: Add dev_found")
> 
> Signed-off-by: John Garry <john.garry@huawei.com>

Reviewed-by: Shane Seymour <shane.seymour@hpe.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* RE: [PATCH 1/3] hisi_sas: fix v1 itct masks
  2015-12-21 11:35   ` John Garry
  (?)
@ 2016-01-08  4:31   ` Seymour, Shane M
  -1 siblings, 0 replies; 16+ messages in thread
From: Seymour, Shane M @ 2016-01-08  4:31 UTC (permalink / raw)
  To: John Garry, JBottomley, martin.petersen
  Cc: linuxarm, zhangfei.gao, xuwei5, john.garry2, linux-scsi, linux-kernel


> The mask fields are for quad-words, so add ULL suffix.
> Also unreferenced ITCT_HDR_BREAK_REPLY and ITCT_HDR_MAX_BURST are removed.
> 
> Fixes: 50af155b6c ("hisi_sas: Add v1 hardware reg")
> 
> Signed-off-by: John Garry <john.garry@huawei.com>

Reviewed-by: Shane Seymour <shane.seymour@hpe.com>

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 1/3] hisi_sas: fix v1 itct masks
  2015-12-21 11:35   ` John Garry
  (?)
  (?)
@ 2016-01-08  4:37   ` Matthew R. Ochs
  -1 siblings, 0 replies; 16+ messages in thread
From: Matthew R. Ochs @ 2016-01-08  4:37 UTC (permalink / raw)
  To: John Garry
  Cc: James Bottomley, Martin K. Petersen, linuxarm, zhangfei.gao,
	xuwei5, john.garry2, linux-scsi, linux-kernel

Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 2/3] hisi_sas: fix typo in setup_itct_v1_hw()
  2015-12-21 11:35   ` John Garry
  (?)
  (?)
@ 2016-01-08  4:40   ` Matthew R. Ochs
  -1 siblings, 0 replies; 16+ messages in thread
From: Matthew R. Ochs @ 2016-01-08  4:40 UTC (permalink / raw)
  To: John Garry
  Cc: James Bottomley, Martin K. Petersen, linuxarm, zhangfei.gao,
	xuwei5, john.garry2, linux-scsi, linux-kernel

Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 3/3] hisi_sas: use u64 for qw0 in free_device_v1_hw()
  2015-12-21 11:35   ` John Garry
  (?)
  (?)
@ 2016-01-08  4:51   ` Matthew R. Ochs
  -1 siblings, 0 replies; 16+ messages in thread
From: Matthew R. Ochs @ 2016-01-08  4:51 UTC (permalink / raw)
  To: John Garry
  Cc: James Bottomley, Martin K. Petersen, linuxarm, zhangfei.gao,
	xuwei5, john.garry2, linux-scsi, linux-kernel

> On Dec 21, 2015, at 5:35 AM, John Garry <john.garry@huawei.com> wrote:
> 
> By reading in itct.qw0 into a 32b variable the top
> 32 bits were being lost.
> In practice this was OK as they were zeroes.
> 
> Fixes: 27a3f229 ("hisi_sas: Add cq interrupt")
> 
> Signed-off-by: John Garry <john.garry@huawei.com>
> ---
> drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
> index 38ff575..057fdeb 100644
> --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
> +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c
> @@ -539,7 +539,8 @@ static void free_device_v1_hw(struct hisi_hba *hisi_hba,
> {
> 	u64 dev_id = sas_dev->device_id;
> 	struct hisi_sas_itct *itct = &hisi_hba->itct[dev_id];
> -	u32 qw0, reg_val = hisi_sas_read32(hisi_hba, CFG_AGING_TIME);
> +	u64 qw0;

This should probably be a __le64, but not a big deal.

Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com> 

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/3] hisi_sas v1 hw itct fixes
  2015-12-21 11:35 ` John Garry
@ 2016-01-08 17:13   ` Martin K. Petersen
  -1 siblings, 0 replies; 16+ messages in thread
From: Martin K. Petersen @ 2016-01-08 17:13 UTC (permalink / raw)
  To: John Garry
  Cc: JBottomley, martin.petersen, linuxarm, zhangfei.gao, xuwei5,
	john.garry2, linux-scsi, linux-kernel, Shane M Seymour,
	Matthew R. Ochs

>>>>> "John" == John Garry <john.garry@huawei.com> writes:

John> This patchset introduces some minor fixes for v1 hw itct
John> configuration.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH 0/3] hisi_sas v1 hw itct fixes
@ 2016-01-08 17:13   ` Martin K. Petersen
  0 siblings, 0 replies; 16+ messages in thread
From: Martin K. Petersen @ 2016-01-08 17:13 UTC (permalink / raw)
  To: John Garry
  Cc: JBottomley, martin.petersen, linuxarm, zhangfei.gao, xuwei5,
	john.garry2, linux-scsi, linux-kernel, Shane M Seymour,
	Matthew R. Ochs

>>>>> "John" == John Garry <john.garry@huawei.com> writes:

John> This patchset introduces some minor fixes for v1 hw itct
John> configuration.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2016-01-08 17:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-21 11:35 [PATCH 0/3] hisi_sas v1 hw itct fixes John Garry
2015-12-21 11:35 ` John Garry
2015-12-21 11:35 ` [PATCH 1/3] hisi_sas: fix v1 itct masks John Garry
2015-12-21 11:35   ` John Garry
2016-01-08  4:31   ` Seymour, Shane M
2016-01-08  4:37   ` Matthew R. Ochs
2015-12-21 11:35 ` [PATCH 2/3] hisi_sas: fix typo in setup_itct_v1_hw() John Garry
2015-12-21 11:35   ` John Garry
2016-01-08  4:30   ` Seymour, Shane M
2016-01-08  4:40   ` Matthew R. Ochs
2015-12-21 11:35 ` [PATCH 3/3] hisi_sas: use u64 for qw0 in free_device_v1_hw() John Garry
2015-12-21 11:35   ` John Garry
2016-01-08  4:29   ` Seymour, Shane M
2016-01-08  4:51   ` Matthew R. Ochs
2016-01-08 17:13 ` [PATCH 0/3] hisi_sas v1 hw itct fixes Martin K. Petersen
2016-01-08 17:13   ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.