]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sfc: Fix calculation of vf_i in map_vi_index()
authorRobert Stonehouse <rstonehouse@solarflare.com>
Fri, 2 Mar 2012 17:20:00 +0000 (17:20 +0000)
committerBen Hutchings <bhutchings@solarflare.com>
Tue, 6 Mar 2012 18:14:13 +0000 (18:14 +0000)
This was broken during refactoring to use efx_vf_size().

[bwh: Keep using efx_vf_size()]
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
drivers/net/ethernet/sfc/siena_sriov.c

index 80976e84eee6119d9da5aab034ab414a59567fb0..9cb3b84ecae99a24553f0bd039d5a5fdbaafbd8e 100644 (file)
@@ -514,7 +514,7 @@ static bool map_vi_index(struct efx_nic *efx, unsigned abs_index,
 
        if (abs_index < EFX_VI_BASE)
                return true;
-       vf_i = (abs_index - EFX_VI_BASE) * efx_vf_size(efx);
+       vf_i = (abs_index - EFX_VI_BASE) / efx_vf_size(efx);
        if (vf_i >= efx->vf_init_count)
                return true;