mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
staging: axis-fifo: Remove unnecessary zero-length packet check
Remove the check for zero-length packets as this condition cannot occur during normal operation. According to the Xilinx AXI4-Stream FIFO Product Guide (PG080), in the Receive Length Register (RLR) description: "The smallest packet that can be received is 1 byte." A zero-length packet would indicate a bug in the IP core itself. Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://patch.msgid.link/20251227212640.3321310-6-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
eb757312ac
commit
ab517a047b
|
|
@ -193,11 +193,6 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
|
|||
|
||||
bytes_available = ioread32(fifo->base_addr + XLLF_RLR_OFFSET);
|
||||
words_available = bytes_available / sizeof(u32);
|
||||
if (!bytes_available) {
|
||||
dev_err(fifo->dt_device, "received a packet of length 0\n");
|
||||
ret = -EIO;
|
||||
goto end_unlock;
|
||||
}
|
||||
|
||||
if (bytes_available > len) {
|
||||
dev_err(fifo->dt_device, "user read buffer too small (available bytes=%zu user buffer bytes=%zu)\n",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user