Skip to content

Commit 1d3cfc2

Browse files
kelvin-caojonmason
authored andcommitted
ntb_hw_switchtec: Remove code for disabling ID protection
ID protection is a firmware setting for NT window access control. With it enabled, only the posted requests with requester IDs in the requester ID table will be allowed to access the NT windows. Otherwise all posted requests are allowed. Normally user will configure it statically via the Switchtec config file, and it will take effect when the firmware boots up. The driver can also toggle the ID protection setting dynamically, which will overwrite the static setting in the Switchtec config file as a side effect. Currently, the driver disables the ID protection. However, it's not necessary to disable the ID protection at the driver level as the driver has already configured the proper requester IDs in the requester ID table to allow the corresponding posted requests to hit the NT windows. Remove the code that disables the ID protection to make the static setting prevail. Note: ID protection is not applicable to non-posted requests. Signed-off-by: Kelvin Cao <[email protected]> Signed-off-by: Jon Mason <[email protected]>
1 parent 2f58265 commit 1d3cfc2

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

drivers/ntb/hw/mscc/ntb_hw_switchtec.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -967,9 +967,6 @@ static int config_req_id_table(struct switchtec_ntb *sndev,
967967
if (rc)
968968
return rc;
969969

970-
iowrite32(NTB_PART_CTRL_ID_PROT_DIS,
971-
&mmio_ctrl->partition_ctrl);
972-
973970
for (i = 0; i < count; i++) {
974971
iowrite32(req_ids[i] << 16 | NTB_CTRL_REQ_ID_EN,
975972
&mmio_ctrl->req_id_table[i]);

include/linux/switchtec.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,6 @@ enum {
337337
NTB_CTRL_REQ_ID_EN = 1 << 0,
338338

339339
NTB_CTRL_LUT_EN = 1 << 0,
340-
341-
NTB_PART_CTRL_ID_PROT_DIS = 1 << 0,
342340
};
343341

344342
struct ntb_ctrl_regs {

0 commit comments

Comments
 (0)