Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In crosslink_setup_mws, xlate_pos should be calculated after size #83

Open
jmpallotta opened this issue Dec 10, 2019 · 1 comment
Open

Comments

@jmpallotta
Copy link
Contributor

In crosslink_setup_mws, size is calculated based upon the available BAR space. After xlate_pos is calculated, the size is potentially adjusted to the offset size if conditions are met. I believe xlate_pos should be recalculated if the size is adjusted.

Current master branch has:

size = pci_resource_len(sndev->ntb.pdev, bar) - offset;
xlate_pos = ilog2(size);

if (offset && size > offset)
  size = offset;

If I am correct, it should be:

size = pci_resource_len(sndev->ntb.pdev, bar) - offset;
if (offset && size > offset)
  size = offset;
xlate_pos = ilog2(size);
@lsgunth
Copy link
Collaborator

lsgunth commented Dec 10, 2019

Looks correct to me. Better if you just send PRs for problems you have solutions to. We can review and merge them much quicker. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants