From: Hassan Naveed <[email protected]> Date: Wed, 7 Dec 2016 09:58:54 -0800
> Fix pch_gbe driver for ethernet operations for a big endian CPU. > Values written to and read from transmit and receive descriptors > in the pch_gbe driver are byte swapped from the perspective of a > big endian CPU, since the ethernet controller always operates in > little endian mode. Rectify this by appropriately byte swapping > these descriptor field values in the driver software. > > Signed-off-by: Hassan Naveed <[email protected]> > Reviewed-by: Paul Burton <[email protected]> > Reviewed-by: Matt Redfearn <[email protected]> As explained by Francois, you need to use the proper endian types in the descriptor datastructure. Then please run sparse with endianness checking enabled on the build of the driver.
