Re: [PATCH net-next 2/2] bnxt_en: define sriov_lock unconditionally

From: Michael Chan
Date: Tue Jul 25 2017 - 12:36:30 EST


On Tue, Jul 25, 2017 at 8:29 AM, Arnd Bergmann <arnd@xxxxxxxx> wrote:
> The sriov_lock is used to serialize the sriov code with the vfr code.
> However, when SRIOV is disabled, the lock is not there at all, leading
> to a build error:
>
> drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c: In function 'bnxt_dl_eswitch_mode_set':
> drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c:410:16: error: 'struct bnxt' has no member named 'sriov_lock'
>
> We can either provide the mutex in this configuration, too, or
> disable both SRIOV and VFR together. This implements the first
> approach, since it seems like a reasonable configuration for
> guest kernels to have, and the extra lock will be harmless when
> there is no contention.
>
> Fixes: 4ab0c6a8ffd7 ("bnxt_en: add support to enable VF-representors")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

Sathya already sent 3 patches to fix some of these issues. But I need
to rework one of his patch and resend.

Thanks.