On Wed, Feb 06, 2019 at 01:30:18PM +0100, Thierry Reding wrote: > From: Thierry Reding <tred...@nvidia.com> > > Read MAC address 32-bit at a time and manually extract the individual > bytes. This avoids pointer aliasing and gives the compiler a better > chance of optimizing the operation. > > Suggested-by: Andrew Lunn <and...@lunn.ch> > Signed-off-by: Thierry Reding <tred...@nvidia.com> > --- > Applies to net-next. > > I tested this on a Jetson TX2 with an add-in Realtek ethernet card that > has a properly programmed OTP to verify that I got the endianess right. > Seems like everything works and the device behaves the same with or > without this patch. > > Changes in v3: > - align MAC address to u16 for is_valid_ether_addr() > > drivers/net/ethernet/realtek/r8169.c | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-)
I also forgot Andrew's Reviewed-by here, but technically the patch has changed, so I'll leave it up to him to confirm he's still okay with this version. Thierry
signature.asc
Description: PGP signature