net/sonic: Fix receive buffer handling
Finn Thain authored
[ Upstream commit 9e311820 ]

The SONIC can sometimes advance its rx buffer pointer (RRP register)
without advancing its rx descriptor pointer (CRDA register). As a result
the index of the current rx descriptor may not equal that of the current
rx buffer. The driver mistakenly assumes that they are always equal.
This assumption leads to incorrect packet lengths and possible packet
duplication. Avoid this by calling a new function to locate the buffer
corresponding to a given descriptor.

Fixes: efcce839

 ("[PATCH] macsonic/jazzsonic network drivers update")
Tested-by: default avatarStan Johnson <userm57@yahoo.com>
Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
36db400a
Name Last commit Last update
Documentation PM / devfreq: Add new name attribute for sysfs
arch powerpc/fsl/dts: add fsl,erratum-a011043
block block: don't use bio->bi_vcnt to figure out segment number
certs Replace magic for trusting the secondary keyring with #define
crypto crypto: pcrypt - Fix user-after-free on module unload
drivers net/sonic: Fix receive buffer handling
firmware Fix built-in early-load Intel microcode alignment
fs reiserfs: Fix memory leak of journal device string
include cfg80211: Fix radar event during another phy CAC
init fork: fix some -Wmissing-prototypes warnings
ipc ipc/mqueue.c: only perform resource calculation if user valid
kernel cgroup: Prevent double killing of css when enabling threaded cgroup
lib bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()
mm mm/mempolicy.c: fix out of bounds write in mpol_parse_str()
net vti[6]: fix packet tx through bpf_redirect()
samples samples: bpf: fix syscall_tp due to unused syscall
scripts ARM: 8950/1: ftrace/recordmcount: filter relocation types
security keys: Timestamp new keys
sound ASoC: sti: fix possible sleep-in-atomic
tools tools lib: Fix builds when glibc contains strlcpy()
usr kbuild: clean compressed initramfs image
virt KVM: arm/arm64: vgic: Don't rely on the wrong pending table
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Add hch to .get_maintainer.ignore
.gitattributes .gitattributes: set git diff driver for C source code files
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Linux kernel
============

This file was moved to Documentation/admin-guide/README.rst

Please notice that there are several guides for kernel developers and users.
These guides can be rendered in a number of formats, like HTML and PDF.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.