Thread (10 messages) flat view 10 messages, 2 authors, 2026-07-27

Re: [PATCH net v4 2/3] net: ethernet: oa_tc6: Improvements to error recovery

From: Parthiban Veerasooran <parthiban.veerasooran@microchip.com>
Date: 2026-07-22 10:09:17
Also in: lkml

Imperative mood for the subject: "Improve error recovery" (netdev 
convention).

On 21/07/26 7:50 am, Selvamani Rajagopal via B4 Relay wrote:
quoted hunk ↗ jump to hunk
  static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,
@@ -931,8 +966,7 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,
         /* Process the chunk with only rx frame end */
         if (end_valid && !start_valid) {
                 size = end_byte_offset + 1;
-               oa_tc6_prcs_rx_frame_end(tc6, data, size);
-               return 0;
+               return oa_tc6_prcs_rx_frame_end(tc6, data, size);
         }

         /* Process the chunk with previous rx frame end and next rx frame
@@ -946,6 +980,14 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,
                 if (tc6->rx_skb) {
                         size = end_byte_offset + 1;
                         oa_tc6_prcs_rx_frame_end(tc6, data, size);
oa_tc6_prcs_rx_frame_end() now returns int, but this drops the return — 
every other call in this patch propagates it. Is it deliberate?
quoted hunk ↗ jump to hunk
+
+                       /* Purpose of rx_buf_overflow is make the
+                        * code to look for new frame. At this
+                        * stage, we have a new frame to process.
+                        * So, making it false, in case it is set
+                        * to true by oa_tc6_prcs_rx_frame_end.
+                        */
+                       tc6->rx_buf_overflow = false;
                 }
                 size = OA_TC6_CHUNK_PAYLOAD_SIZE - start_byte_offset;
                 return oa_tc6_prcs_rx_frame_start(tc6,
@@ -954,9 +996,7 @@ static int oa_tc6_prcs_rx_chunk_payload(struct oa_tc6 *tc6, u8 *data,
         }

         /* Process the chunk with ongoing rx frame data */
-       oa_tc6_prcs_ongoing_rx_frame(tc6, data, footer);
-
-       return 0;
+       return oa_tc6_prcs_ongoing_rx_frame(tc6, data, footer);
footer is unused here. Either drop the unused parameter or a note why it
stays.

Best regards,
Parthiban V
  }
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help