Patch "iavf: Fix for setting queues to 0" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    iavf: Fix for setting queues to 0

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iavf-fix-for-setting-queues-to-0.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e1f087a42fd9edd1971449e235dee2431101d10e
Author: Grzegorz Szczurek <grzegorzx.szczurek@xxxxxxxxx>
Date:   Fri Jun 4 09:49:00 2021 -0700

    iavf: Fix for setting queues to 0
    
    [ Upstream commit 9a6e9e483a9684a34573fd9f9e30ecfb047cb8cb ]
    
    Now setting combine to 0 will be rejected with the
    appropriate error code.
    This has been implemented by adding a condition that checks
    the value of combine equal to zero.
    Without this patch, when the user requested it, no error was
    returned and combine was set to the default value for VF.
    
    Fixes: 5520deb15326 ("iavf: Enable support for up to 16 queues")
    Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@xxxxxxxxx>
    Tested-by: Tony Brelinski <tony.brelinski@xxxxxxxxx>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
index 5508ccbf9f57b..ea85b06857fa2 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_ethtool.c
@@ -903,7 +903,7 @@ static int iavf_set_channels(struct net_device *netdev,
 	/* All of these should have already been checked by ethtool before this
 	 * even gets to us, but just to be sure.
 	 */
-	if (num_req > adapter->vsi_res->num_queue_pairs)
+	if (num_req == 0 || num_req > adapter->vsi_res->num_queue_pairs)
 		return -EINVAL;
 
 	if (num_req == adapter->num_active_queues)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux