mirror of
https://github.com/torvalds/linux.git
synced 2026-05-14 21:53:21 -04:00
s390/qeth: fix underestimated count of buffer elements
[ Upstream commit89271c65ed] For a memory range/skb where the last byte falls onto a page boundary (ie. 'end' is of the form xxx...xxx001), the PFN_UP() part of the calculation currently doesn't round up to the next PFN due to an off-by-one error. Thus qeth believes that the skb occupies one page less than it actually does, and may select a IO buffer that doesn't have enough spare buffer elements to fit all of the skb's data. HW detects this as a malformed buffer descriptor, and raises an exception which then triggers device recovery. Fixes:2863c61334("qeth: refactor calculation of SBALE count") Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
99a781947c
commit
fcdfb9d80d
@@ -834,7 +834,7 @@ struct qeth_trap_id {
|
||||
*/
|
||||
static inline int qeth_get_elements_for_range(addr_t start, addr_t end)
|
||||
{
|
||||
return PFN_UP(end - 1) - PFN_DOWN(start);
|
||||
return PFN_UP(end) - PFN_DOWN(start);
|
||||
}
|
||||
|
||||
static inline int qeth_get_micros(void)
|
||||
|
||||
Reference in New Issue
Block a user