Skip to content

Commit

Permalink
ntb_hw_switchtec: Fix a minor issue in config_req_id_table()
Browse files Browse the repository at this point in the history
The req_id_table_size field is 16-bit wide, use ioread16() to read the
value.

Signed-off-by: Kelvin Cao <kelvin.cao@microchip.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
  • Loading branch information
Kelvin Cao authored and Jon Mason committed Jan 11, 2022
1 parent 1d3cfc2 commit 8cd7786
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ntb/hw/mscc/ntb_hw_switchtec.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ static int config_req_id_table(struct switchtec_ntb *sndev,
u32 error;
u32 proxy_id;

if (ioread32(&mmio_ctrl->req_id_table_size) < count) {
if (ioread16(&mmio_ctrl->req_id_table_size) < count) {
dev_err(&sndev->stdev->dev,
"Not enough requester IDs available.\n");
return -EFAULT;
Expand Down

0 comments on commit 8cd7786

Please sign in to comment.