mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 14:05:39 +00:00
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>
This commit is contained in:
parent
7ff351c86b
commit
857e239c3e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user