]> git.baikalelectronics.ru Git - kernel.git/commit
igb: handle vlan types with checker enabled
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Fri, 26 Mar 2021 00:38:28 +0000 (17:38 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 26 May 2021 16:11:41 +0000 (09:11 -0700)
commitc7cbfb028b95360403d579c47aaaeef1ff140964
tree031e6fe0d24cf4546281008a3817e66e50f3c074
parent88c228b22e001cce1d36112b883bd320c0893ef8
igb: handle vlan types with checker enabled

The sparse build (C=2) finds some issues with how the driver
dealt with the (very difficult) hardware that in some generations
uses little-endian, and in others uses big endian, for the VLAN
field. The code as written picks __le16 as a type and for some
hardware revisions we override it to __be16 as done in this
patch. This impacted the VF driver as well so fix it there too.

Also change the vlan_tci assignment to override the sparse
warning without changing functionality.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Dave Switzer <david.switzer@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/igbvf/netdev.c