All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Remove code for disabling ID protection
@ 2021-04-19 15:09 Kelvin Cao
  0 siblings, 0 replies; 3+ messages in thread
From: Kelvin Cao @ 2021-04-19 15:09 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]

ID protection is a static setting in the Switchtec config file. With
ID protection enabled, only posted requests with requester IDs in the
requester ID table will be allowed to access the NT windows. Otherwise
all posted requests are allowed. ID protect is not applicable to
non-posted requests.

There's no need to disable it in the driver as we have already configured
the requester IDs. The driver works no matter this setting is enabled or
not.

Signed-off-by: Kelvin Cao <kelvin.cao@microchip.com>
---
 drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 3 ---
 include/linux/switchtec.h              | 2 --
 2 files changed, 5 deletions(-)

diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
index 4c6eb61a6ac6..700a6218e72e 100644
--- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
+++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
@@ -966,9 +966,6 @@ static int config_req_id_table(struct switchtec_ntb *sndev,
 	if (rc)
 		return rc;
 
-	iowrite32(NTB_PART_CTRL_ID_PROT_DIS1,
-		  &mmio_ctrl->partition_ctrl);
-
 	for (i = 0; i < count; i++) {
 		iowrite32(req_ids[i] << 16 | NTB_CTRL_REQ_ID_EN,
 			  &mmio_ctrl->req_id_table[i]);
diff --git a/include/linux/switchtec.h b/include/linux/switchtec.h
index 082f1d51957a..76dc6d2085eb 100644
--- a/include/linux/switchtec.h
+++ b/include/linux/switchtec.h
@@ -336,8 +336,6 @@ enum {
 	NTB_CTRL_REQ_ID_EN = 1 << 0,
 
 	NTB_CTRL_LUT_EN = 1 << 0,
-
-	NTB_PART_CTRL_ID_PROT_DIS = 1 << 0,
 };
 
 struct ntb_ctrl_regs {
-- 
2.25.1

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

* [PATCH] Remove code for disabling ID protection
@ 2021-04-19 15:08 Kelvin Cao
  0 siblings, 0 replies; 3+ messages in thread
From: Kelvin Cao @ 2021-04-19 15:08 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1545 bytes --]

ID protection is a static setting in the Switchtec config file. With
ID protection enabled, only posted requests with requester IDs in the
requester ID table will be allowed to access the NT windows. Otherwise
all posted requests are allowed. ID protect is not applicable to
non-posted requests.

There's no need to disable it in the driver as we have already configured
the requester IDs. The driver works no matter this setting is enabled or
not.

Signed-off-by: Kelvin Cao <kelvin.cao@microchip.com>
---
 drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 3 ---
 include/linux/switchtec.h              | 2 --
 2 files changed, 5 deletions(-)

diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
index 4c6eb61a6ac6..700a6218e72e 100644
--- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
+++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
@@ -966,9 +966,6 @@ static int config_req_id_table(struct switchtec_ntb *sndev,
 	if (rc)
 		return rc;
 
-	iowrite32(NTB_PART_CTRL_ID_PROT_DIS,
-		  &mmio_ctrl->partition_ctrl);
-
 	for (i = 0; i < count; i++) {
 		iowrite32(req_ids[i] << 16 | NTB_CTRL_REQ_ID_EN,
 			  &mmio_ctrl->req_id_table[i]);
diff --git a/include/linux/switchtec.h b/include/linux/switchtec.h
index 082f1d51957a..76dc6d2085eb 100644
--- a/include/linux/switchtec.h
+++ b/include/linux/switchtec.h
@@ -336,8 +336,6 @@ enum {
 	NTB_CTRL_REQ_ID_EN = 1 << 0,
 
 	NTB_CTRL_LUT_EN = 1 << 0,
-
-	NTB_PART_CTRL_ID_PROT_DIS = 1 << 0,
 };
 
 struct ntb_ctrl_regs {
-- 
2.25.1

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

* [PATCH] Remove code for disabling ID protection
@ 2021-04-19 14:55 Kelvin Cao
  0 siblings, 0 replies; 3+ messages in thread
From: Kelvin Cao @ 2021-04-19 14:55 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1545 bytes --]

ID protection is a static setting in the Switchtec config file. With
ID protection enabled, only posted requests with requester IDs in the
requester ID table will be allowed to access the NT windows. Otherwise
all posted requests are allowed. ID protect is not applicable to
non-posted requests.

There's no need to disable it in the driver as we have already configured
the requester IDs. The driver works no matter this setting is enabled or
not.

Signed-off-by: Kelvin Cao <kelvin.cao@microchip.com>
---
 drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 3 ---
 include/linux/switchtec.h              | 2 --
 2 files changed, 5 deletions(-)

diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
index 4c6eb61a6ac6..700a6218e72e 100644
--- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
+++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c
@@ -966,9 +966,6 @@ static int config_req_id_table(struct switchtec_ntb *sndev,
 	if (rc)
 		return rc;
 
-	iowrite32(NTB_PART_CTRL_ID_PROT_DIS,
-		  &mmio_ctrl->partition_ctrl);
-
 	for (i = 0; i < count; i++) {
 		iowrite32(req_ids[i] << 16 | NTB_CTRL_REQ_ID_EN,
 			  &mmio_ctrl->req_id_table[i]);
diff --git a/include/linux/switchtec.h b/include/linux/switchtec.h
index 082f1d51957a..76dc6d2085eb 100644
--- a/include/linux/switchtec.h
+++ b/include/linux/switchtec.h
@@ -336,8 +336,6 @@ enum {
 	NTB_CTRL_REQ_ID_EN = 1 << 0,
 
 	NTB_CTRL_LUT_EN = 1 << 0,
-
-	NTB_PART_CTRL_ID_PROT_DIS = 1 << 0,
 };
 
 struct ntb_ctrl_regs {
-- 
2.25.1

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

end of thread, other threads:[~2021-04-19 15:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-19 15:09 [PATCH] Remove code for disabling ID protection Kelvin Cao
  -- strict thread matches above, loose matches on Subject: below --
2021-04-19 15:08 Kelvin Cao
2021-04-19 14:55 Kelvin Cao

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.