aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/intel/fm10k/fm10k_mbx.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
index 27f82791e39a..1b2738380518 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_mbx.c
@@ -327,7 +327,7 @@ static u16 fm10k_mbx_validate_msg_size(struct fm10k_mbx_info *mbx, u16 len)
327 } while (total_len < len); 327 } while (total_len < len);
328 328
329 /* message extends out of pushed section, but fits in FIFO */ 329 /* message extends out of pushed section, but fits in FIFO */
330 if ((len < total_len) && (msg_len <= mbx->rx.size)) 330 if ((len < total_len) && (msg_len <= mbx->max_size))
331 return 0; 331 return 0;
332 332
333 /* return length of invalid section */ 333 /* return length of invalid section */
@@ -1063,8 +1063,11 @@ static void fm10k_mbx_reset_work(struct fm10k_mbx_info *mbx)
1063 * @mbx: pointer to mailbox 1063 * @mbx: pointer to mailbox
1064 * @size: new value for max_size 1064 * @size: new value for max_size
1065 * 1065 *
1066 * This function will update the max_size value and drop any outgoing messages 1066 * This function updates the max_size value and drops any outgoing messages
1067 * from the head of the Tx FIFO that are larger than max_size. 1067 * at the head of the Tx FIFO if they are larger than max_size. It does not
1068 * drop all messages, as this is too difficult to parse and remove them from
1069 * the FIFO. Instead, rely on the checking to ensure that messages larger
1070 * than max_size aren't pushed into the memory buffer.
1068 **/ 1071 **/
1069static void fm10k_mbx_update_max_size(struct fm10k_mbx_info *mbx, u16 size) 1072static void fm10k_mbx_update_max_size(struct fm10k_mbx_info *mbx, u16 size)
1070{ 1073{