Skip to content

Commit 857e239

Browse files
jmpallottajonmason
authored andcommitted
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 <[email protected]> Signed-off-by: Kelvin Cao <[email protected]> Signed-off-by: Jon Mason <[email protected]>
1 parent 7ff351c commit 857e239

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/ntb/hw/mscc/ntb_hw_switchtec.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,7 @@ static int switchtec_ntb_init_sndev(struct switchtec_ntb *sndev)
858858
tpart_vec |= ioread32(&sndev->mmio_ntb->ntp_info[self].target_part_low);
859859

860860
part_map = ioread64(&sndev->mmio_ntb->ep_map);
861+
tpart_vec &= part_map;
861862
part_map &= ~(1 << sndev->self_partition);
862863

863864
if (!tpart_vec) {

0 commit comments

Comments
 (0)