From: Kelvin Cao Date: Fri, 24 Dec 2021 01:23:34 +0000 (-0800) Subject: ntb_hw_switchtec: Fix a minor issue in config_req_id_table() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8cd778650ae223cd306588042b55d0290ef81037;p=linux.git 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 Signed-off-by: Jon Mason --- diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c index e79a355bafbf3..88ae18b0efa8d 100644 --- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c +++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c @@ -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;