Skip to contentSkip to conversation

Remove code for disabling ID protection

PATCH New Kelvin Cao 1 participant 1 message Apr 19, 2021

Subsystems (2)
lore
Share & tools
lore

Kelvin Cao

author
#0 lore raw

PATCH 1/1 Remove code for disabling ID protection

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.

---
 drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 3 ---
 include/linux/switchtec.h              | 2 --
 2 files changed, 5 deletions(-)
drivers/ntb/hw/mscc/ntb_hw_switchtec.c +0 -3
index 4c6eb61a6ac6..700a6218e72e 100644
@@ -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]);
include/linux/switchtec.h +0 -2
index 082f1d51957a..76dc6d2085eb 100644
@@ -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 {
Signature · 1 line
2.25.1