]> git.ipfire.org Git - people/arne_f/kernel.git/commit
e1000e: Fix the max snoop/no-snoop latency for 10M
authorSasha Neftin <sasha.neftin@intel.com>
Sun, 4 Jul 2021 07:11:41 +0000 (10:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Sep 2021 07:43:07 +0000 (09:43 +0200)
commitb7b35cc5cb6f460c0a801ee869b481fb5a107f68
tree87c35ec28b540dd89decd5a8f0ae87237f24373b
parentde4cd4160161f47114d392f1f5f2dd42c77c6ba7
e1000e: Fix the max snoop/no-snoop latency for 10M

[ Upstream commit 44a13a5d99c71bf9e1676d9e51679daf4d7b3d73 ]

We should decode the latency and the max_latency before directly compare.
The latency should be presented as lat_enc = scale x value:
lat_enc_d = (lat_enc & 0x0x3ff) x (1U << (5*((max_ltr_enc & 0x1c00)
>> 10)))

Fixes: cf8fb73c23aa ("e1000e: add support for LTR on I217/I218")
Suggested-by: Yee Li <seven.yi.lee@gmail.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/e1000e/ich8lan.c
drivers/net/ethernet/intel/e1000e/ich8lan.h