diff options
author | Jeremy Pallotta <jmpallotta@gmail.com> | 2021-12-23 17:23:31 -0800 |
---|---|---|
committer | Jon Mason <jdmason@kudzu.us> | 2022-01-11 15:38:59 -0500 |
commit | 857e239c3ef57e6ba0ff148de96e14249a4d669b (patch) | |
tree | c35e8575060983d53240c7d81c3e993c38d8e5e6 /drivers/ntb | |
parent | 7ff351c86b6b258f387502ab2c9b9d04f82c1c3d (diff) | |
download | linux-857e239c3ef57e6ba0ff148de96e14249a4d669b.tar.gz linux-857e239c3ef57e6ba0ff148de96e14249a4d669b.tar.bz2 linux-857e239c3ef57e6ba0ff148de96e14249a4d669b.zip |
ntb_hw_switchtec: AND with the part_map for a valid tpart_vec
Some firmware versions return 1 in the target partition vector for
undefined partitions. AND with the part_map to give a valid tpart_vec.
Signed-off-by: Jeremy Pallotta <jmpallotta@gmail.com>
Signed-off-by: Kelvin Cao <kelvin.cao@microchip.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/ntb')
-rw-r--r-- | drivers/ntb/hw/mscc/ntb_hw_switchtec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c index 36efba21db4b..8e9b97631884 100644 --- a/drivers/ntb/hw/mscc/ntb_hw_switchtec.c +++ b/drivers/ntb/hw/mscc/ntb_hw_switchtec.c @@ -858,6 +858,7 @@ static int switchtec_ntb_init_sndev(struct switchtec_ntb *sndev) tpart_vec |= ioread32(&sndev->mmio_ntb->ntp_info[self].target_part_low); part_map = ioread64(&sndev->mmio_ntb->ep_map); + tpart_vec &= part_map; part_map &= ~(1 << sndev->self_partition); if (!tpart_vec) { |