| 80fd2297 | 27-Dec-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: Clean up register and mask definitions
Improve readability and consistency of hardware register definitions: - Remove unnecessary leading zeros from register offset values - Use
staging: axis-fifo: Clean up register and mask definitions
Improve readability and consistency of hardware register definitions: - Remove unnecessary leading zeros from register offset values - Use BIT() macro for single-bit interrupt mask definitions - Align values and comments for better readability
No functional change.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://patch.msgid.link/20251227212640.3321310-9-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| 02b2a366 | 27-Dec-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: Remove redundant comments
Drop banner-style section header comments and also remove comments around self-explanatory code to reduce clutter and improve readability.
No functiona
staging: axis-fifo: Remove redundant comments
Drop banner-style section header comments and also remove comments around self-explanatory code to reduce clutter and improve readability.
No functional changes.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://patch.msgid.link/20251227212640.3321310-8-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| 04efe3aa | 27-Dec-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: Remove noisy error messages for user errors
Remove dev_err() calls for conditions caused by invalid userspace input. Logging them clutters the kernel log, especially if userspace
staging: axis-fifo: Remove noisy error messages for user errors
Remove dev_err() calls for conditions caused by invalid userspace input. Logging them clutters the kernel log, especially if userspace repeatedly makes invalid calls.
Also, consolidate the write validation checks into a single condition.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://patch.msgid.link/20251227212640.3321310-7-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| ab517a04 | 27-Dec-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
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 F
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>
show more ...
|
| eb757312 | 27-Dec-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: Remove unnecessary casts from file->private_data
Drop explicit casts when accessing file->private_data in the read() and write() paths, as they are not needed.
Signed-off-by: Ov
staging: axis-fifo: Remove unnecessary casts from file->private_data
Drop explicit casts when accessing file->private_data in the read() and write() paths, as they are not needed.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://patch.msgid.link/20251227212640.3321310-5-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| d1a3cfec | 27-Dec-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: Drop unneeded release callback
The release function only clears file->private_data, which is not needed. Remove the callback.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gma
staging: axis-fifo: Drop unneeded release callback
The release function only clears file->private_data, which is not needed. Remove the callback.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://patch.msgid.link/20251227212640.3321310-4-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| eb12093d | 27-Dec-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: Use devm_kasprintf for device name allocation
Replace manual kzalloc + snprintf with devm_kasprintf, which is cleaner and purpose-built for this use case.
Signed-off-by: Ovidiu
staging: axis-fifo: Use devm_kasprintf for device name allocation
Replace manual kzalloc + snprintf with devm_kasprintf, which is cleaner and purpose-built for this use case.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://patch.msgid.link/20251227212640.3321310-3-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| c83d8445 | 27-Dec-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: Add poll() support
Implement poll() file operation to allow userspace applications to wait for FIFO readiness using select()/poll()/epoll().
This replaces the module parameter-b
staging: axis-fifo: Add poll() support
Implement poll() file operation to allow userspace applications to wait for FIFO readiness using select()/poll()/epoll().
This replaces the module parameter-based timeouts removed in the previous commit.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://patch.msgid.link/20251227212640.3321310-2-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| 622c8110 | 19-Sep-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: drop debug print of remapped base address
The probe function prints the remapped base address with dev_dbg(). This message is not useful and printing kernel addresses is discoura
staging: axis-fifo: drop debug print of remapped base address
The probe function prints the remapped base address with dev_dbg(). This message is not useful and printing kernel addresses is discouraged, so remove the debug print.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://lore.kernel.org/r/20250919195400.3180039-6-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| 89443a92 | 19-Sep-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: drop redundant read/write_flags from axis_fifo
The driver stores file flags (read_flags/write_flags) in the axis_fifo struct, duplicating information already available in struct
staging: axis-fifo: drop redundant read/write_flags from axis_fifo
The driver stores file flags (read_flags/write_flags) in the axis_fifo struct, duplicating information already available in struct file.
Switch to using f->f_flags directly in read/write paths and open(), removing the unnecessary fields.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://lore.kernel.org/r/20250919195400.3180039-5-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| 44972885 | 19-Sep-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: remove get_dts_property() helper
The get_dts_property() wrapper around of_property_read_u32() adds no real value and duplicates error handling. Inline the calls directly in axis_
staging: axis-fifo: remove get_dts_property() helper
The get_dts_property() wrapper around of_property_read_u32() adds no real value and duplicates error handling. Inline the calls directly in axis_fifo_parse_dt() to reduce indirection and simplify the code.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://lore.kernel.org/r/20250919195400.3180039-4-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| b10f6768 | 19-Sep-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: remove unneeded irq field from struct axis_fifo
The irq number returned by platform_get_irq() is stored in struct axis_fifo during probe but it is never used afterwards. Drop the
staging: axis-fifo: remove unneeded irq field from struct axis_fifo
The irq number returned by platform_get_irq() is stored in struct axis_fifo during probe but it is never used afterwards. Drop the redundant irq field and use a local variable instead.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://lore.kernel.org/r/20250919195400.3180039-3-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| 60d042a7 | 19-Sep-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: simplify interrupt handling
The irq handler iterates through the interrupt bits one by one in a while() loop, clearing one bit at a time. This is unnecessary and inefficient, as
staging: axis-fifo: simplify interrupt handling
The irq handler iterates through the interrupt bits one by one in a while() loop, clearing one bit at a time. This is unnecessary and inefficient, as the 'Interrupt Status Register' can be cleared with a single write operation.
Also the irq handler checks for some interrupts that are masked out in the 'Interrupt Enable Register', so they are never triggered.
Simplify the irq handler by removing the checks for interrupts that are masked out and clear the whole 'Interrupt Status Register' in one go. The macros that are no longer relevant are also removed.
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://lore.kernel.org/r/20250919195400.3180039-2-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| 82a051e2 | 12-Sep-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: flush RX FIFO on read errors
Flush stale data from the RX FIFO in case of errors, to avoid reading old data when new packets arrive.
Commit c6e8d85fafa7 ("staging: axis-fifo: Re
staging: axis-fifo: flush RX FIFO on read errors
Flush stale data from the RX FIFO in case of errors, to avoid reading old data when new packets arrive.
Commit c6e8d85fafa7 ("staging: axis-fifo: Remove hardware resets for user errors") removed full FIFO resets from the read error paths, which fixed potential TX data losses, but introduced this RX issue.
Fixes: c6e8d85fafa7 ("staging: axis-fifo: Remove hardware resets for user errors") Cc: stable@vger.kernel.org Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://lore.kernel.org/r/20250912101322.1282507-2-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| 6d07bee1 | 12-Sep-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: fix TX handling on copy_from_user() failure
If copy_from_user() fails, write() currently returns -EFAULT, but any partially written data leaves the TX FIFO in an inconsistent sta
staging: axis-fifo: fix TX handling on copy_from_user() failure
If copy_from_user() fails, write() currently returns -EFAULT, but any partially written data leaves the TX FIFO in an inconsistent state. Subsequent write() calls then fail with "transmit length mismatch" errors.
Once partial data is written to the hardware FIFO, it cannot be removed without a TX reset. Commit c6e8d85fafa7 ("staging: axis-fifo: Remove hardware resets for user errors") removed a full FIFO reset for this case, which fixed a potential RX data loss, but introduced this TX issue.
Fix this by introducing a bounce buffer: copy the full packet from userspace first, and write to the hardware FIFO only if the copy was successful.
Fixes: c6e8d85fafa7 ("staging: axis-fifo: Remove hardware resets for user errors") Cc: stable@vger.kernel.org Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://lore.kernel.org/r/20250912101322.1282507-1-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| e5b264e0 | 11-Aug-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: use unique identifiers in device names
Axis-fifo devices use physical addresses in their name, for example 'axis_fifo_0x43c00000'. This is generally frowned upon and it does not
staging: axis-fifo: use unique identifiers in device names
Axis-fifo devices use physical addresses in their name, for example 'axis_fifo_0x43c00000'. This is generally frowned upon and it does not follow the usual naming scheme that uses unique identifiers.
Therefore, use ida_alloc()/ida_free() to implement unique identifiers for axis-fifo device names (i.e. axis_fifo0, axis_fifo1, etc.).
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://lore.kernel.org/r/20250811085417.2641674-2-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| fe4e8197 | 20-Jul-2025 |
Ovidiu Panait <ovidiu.panait.oss@gmail.com> |
staging: axis-fifo: add debugfs interface for dumping fifo registers
For debugging purposes, add a simple, read-only debugfs interface to dump the following fifo registers: ISR - Interrupt Status R
staging: axis-fifo: add debugfs interface for dumping fifo registers
For debugging purposes, add a simple, read-only debugfs interface to dump the following fifo registers: ISR - Interrupt Status Register IER - Interrupt Enable Register TDFV - Transmit Data FIFO Vacancy RDFO - Receive Data FIFO Occupancy
$ cat /sys/kernel/debug/43c00000.axi_fifo_mm_s/regs isr: 0x00000000 ier: 0xfe000000 tdfv: 0x000001fc rdfo: 0x00000000
Signed-off-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com> Link: https://lore.kernel.org/r/20250720183833.3570345-2-ovidiu.panait.oss@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
| c6e8d85f | 19-Apr-2025 |
Gabriel Shahrouzi <gshahrouzi@gmail.com> |
staging: axis-fifo: Remove hardware resets for user errors
The axis-fifo driver performs a full hardware reset (via reset_ip_core()) in several error paths within the read and write functions. This
staging: axis-fifo: Remove hardware resets for user errors
The axis-fifo driver performs a full hardware reset (via reset_ip_core()) in several error paths within the read and write functions. This reset flushes both TX and RX FIFOs and resets the AXI-Stream links.
Allow the user to handle the error without causing hardware disruption or data loss in other FIFO paths.
Fixes: 4a965c5f89de ("staging: add driver for Xilinx AXI-Stream FIFO v4.1 IP core") Cc: stable@vger.kernel.org Signed-off-by: Gabriel Shahrouzi <gshahrouzi@gmail.com> Link: https://lore.kernel.org/r/20250419004306.669605-1-gshahrouzi@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|