From: Hassan Naveed <hassan.nav...@imgtec.com> 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 <hassan.nav...@imgtec.com> > Reviewed-by: Paul Burton <paul.bur...@imgtec.com> > Reviewed-by: Matt Redfearn <matt.redfe...@imgtec.com> 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.