]> www.infradead.org Git - users/jedix/linux-maple.git/commit
bnxt_en: Fix SRIOV on big-endian architecture.
authorMichael Chan <michael.chan@broadcom.com>
Tue, 11 Jul 2017 17:05:36 +0000 (13:05 -0400)
committerAllen Pais <allen.pais@oracle.com>
Tue, 18 Jul 2017 12:25:01 +0000 (17:55 +0530)
commita5b7c9c8e926b7a8ba82f6f1bdbb033c1ebd6c22
tree479e9818ad3165228805d70ccac65222acb4e83c
parent590c5040e5a3517b16e4e1bd17d805114d999196
bnxt_en: Fix SRIOV on big-endian architecture.

The PF driver sets up a list of firmware commands from the VF driver that
needs to be forwarded to the PF for approval.  This list is a 256-bit
bitmap.  The code that sets up the bitmap falls apart on big-endian
architecture.  __set_bit() does not work because it operates on long types
whereas the firmware interface is defined in u32 types, causing bits in
the wrong 32-bit word to be set.

Fix it by setting the proper bits on an array of u32.

Fixes: de68f5de5651 ("bnxt_en: Fix bitmap declaration to work on 32-bit arches.")
Reported-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Orabug: 26000471

Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c