Skip to content

Commit 8cd7786

Browse files
kelvin-caojonmason
authored andcommitted
ntb_hw_switchtec: Fix a minor issue in config_req_id_table()
The req_id_table_size field is 16-bit wide, use ioread16() to read the value. Signed-off-by: Kelvin Cao <[email protected]> Signed-off-by: Jon Mason <[email protected]>
1 parent 1d3cfc2 commit 8cd7786

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ntb/hw/mscc/ntb_hw_switchtec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ static int config_req_id_table(struct switchtec_ntb *sndev,
955955
u32 error;
956956
u32 proxy_id;
957957

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

0 commit comments

Comments
 (0)