]> Git Repo - linux.git/commitdiff
ntb_hw_switchtec: Fix a minor issue in config_req_id_table()
authorKelvin Cao <[email protected]>
Fri, 24 Dec 2021 01:23:34 +0000 (17:23 -0800)
committerJon Mason <[email protected]>
Tue, 11 Jan 2022 20:38:59 +0000 (15:38 -0500)
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]>
drivers/ntb/hw/mscc/ntb_hw_switchtec.c

index e79a355bafbf36860ddc8c50732a6e891a2ce8cd..88ae18b0efa8dadb2b42ef8873dc31c878aa0a2d 100644 (file)
@@ -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;
This page took 0.065169 seconds and 4 git commands to generate.