[stable 4.19 4/4] ice: Set timeout when disabling queues

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

 



From: Anirudh Venkataramanan <anirudh.venkataramanan@xxxxxxxxx>

This patch is a backport of a single line of code from mainline
commit ddf30f7ff840 ("ice: Add handler to configure SR-IOV")

Queues are disabled during module unload using the ice_aqc_opc_dis_txqs
admin queue command. On the latest firmware, this command fails with
the following message: "Failed to disable LAN Tx queues, error: -100"

This patch fixes this issue by setting the timeout field in the command
descriptor.

Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@xxxxxxxxx>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@xxxxxxxxx>
---
 drivers/net/ethernet/intel/ice/ice_common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index fb5e77f263e5..a8749f4a0cb8 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -1865,6 +1865,8 @@ ice_aq_dis_lan_txq(struct ice_hw *hw, u8 num_qgrps,
 		return ICE_ERR_PARAM;
 	desc.flags |= cpu_to_le16(ICE_AQ_FLAG_RD);
 	cmd->num_entries = num_qgrps;
+	cmd->vmvf_and_timeout = cpu_to_le16((5 << ICE_AQC_Q_DIS_TIMEOUT_S) &
+					    ICE_AQC_Q_DIS_TIMEOUT_M);
 
 	for (i = 0; i < num_qgrps; ++i) {
 		/* Calculate the size taken up by the queue IDs in this group */
-- 
2.20.1




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux