From: Michal Schmidt <mschmidt@redhat.com>
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Karol Kolacinski <karol.kolacinski@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Simon Horman <simon.horman@corigine.com>,
Michal Michalik <michal.michalik@intel.com>,
Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
Petr Oros <poros@redhat.com>, Andrew Lunn <andrew@lunn.ch>
Subject: [PATCH net-next v2 3/6] ice: remove ice_ctl_q_info::sq_cmd_timeout
Date: Wed, 12 Apr 2023 10:19:26 +0200 [thread overview]
Message-ID: <20230412081929.173220-4-mschmidt@redhat.com> (raw)
In-Reply-To: <20230412081929.173220-1-mschmidt@redhat.com>
sq_cmd_timeout is initialized to ICE_CTL_Q_SQ_CMD_TIMEOUT and never
changed, so just use the constant directly.
Suggested-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
---
drivers/net/ethernet/intel/ice/ice_common.c | 2 +-
drivers/net/ethernet/intel/ice/ice_controlq.c | 5 +----
drivers/net/ethernet/intel/ice/ice_controlq.h | 1 -
3 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c
index c2fda4fa4188..f4c256563248 100644
--- a/drivers/net/ethernet/intel/ice/ice_common.c
+++ b/drivers/net/ethernet/intel/ice/ice_common.c
@@ -2000,7 +2000,7 @@ void ice_release_res(struct ice_hw *hw, enum ice_aq_res_ids res)
/* there are some rare cases when trying to release the resource
* results in an admin queue timeout, so handle them correctly
*/
- while ((status == -EIO) && (total_delay < hw->adminq.sq_cmd_timeout)) {
+ while ((status == -EIO) && (total_delay < ICE_CTL_Q_SQ_CMD_TIMEOUT)) {
mdelay(1);
status = ice_aq_release_res(hw, res, 0, NULL);
total_delay++;
diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.c b/drivers/net/ethernet/intel/ice/ice_controlq.c
index 6bcfee295991..c8fb10106ec3 100644
--- a/drivers/net/ethernet/intel/ice/ice_controlq.c
+++ b/drivers/net/ethernet/intel/ice/ice_controlq.c
@@ -637,9 +637,6 @@ static int ice_init_ctrlq(struct ice_hw *hw, enum ice_ctl_q q_type)
return -EIO;
}
- /* setup SQ command write back timeout */
- cq->sq_cmd_timeout = ICE_CTL_Q_SQ_CMD_TIMEOUT;
-
/* allocate the ATQ */
ret_code = ice_init_sq(hw, cq);
if (ret_code)
@@ -1066,7 +1063,7 @@ ice_sq_send_cmd(struct ice_hw *hw, struct ice_ctl_q_info *cq,
udelay(ICE_CTL_Q_SQ_CMD_USEC);
total_delay++;
- } while (total_delay < cq->sq_cmd_timeout);
+ } while (total_delay < ICE_CTL_Q_SQ_CMD_TIMEOUT);
/* if ready, copy the desc back to temp */
if (ice_sq_done(hw, cq)) {
diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.h b/drivers/net/ethernet/intel/ice/ice_controlq.h
index c07e9cc9fc6e..e790b2f4e437 100644
--- a/drivers/net/ethernet/intel/ice/ice_controlq.h
+++ b/drivers/net/ethernet/intel/ice/ice_controlq.h
@@ -87,7 +87,6 @@ struct ice_ctl_q_info {
enum ice_ctl_q qtype;
struct ice_ctl_q_ring rq; /* receive queue */
struct ice_ctl_q_ring sq; /* send queue */
- u32 sq_cmd_timeout; /* send queue cmd write back timeout */
u16 num_rq_entries; /* receive queue depth */
u16 num_sq_entries; /* send queue depth */
u16 rq_buf_size; /* receive queue buffer size */
--
2.39.2
next prev parent reply other threads:[~2023-04-12 8:21 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 8:19 [PATCH net-next v2 0/6] ice: lower CPU usage with GNSS Michal Schmidt
2023-04-12 8:19 ` [PATCH net-next v2 1/6] ice: do not busy-wait to read GNSS data Michal Schmidt
2023-04-14 17:29 ` Kubalewski, Arkadiusz
2023-04-17 11:58 ` Simon Horman
2023-04-20 20:59 ` [Intel-wired-lan] " Mekala, SunithaX D
2023-04-12 8:19 ` [PATCH net-next v2 2/6] ice: increase the GNSS data polling interval to 20 ms Michal Schmidt
2023-04-14 17:28 ` Kubalewski, Arkadiusz
2023-04-17 11:58 ` Simon Horman
2023-04-20 20:59 ` [Intel-wired-lan] " Mekala, SunithaX D
2023-04-12 8:19 ` Michal Schmidt [this message]
2023-04-14 17:29 ` [PATCH net-next v2 3/6] ice: remove ice_ctl_q_info::sq_cmd_timeout Kubalewski, Arkadiusz
2023-04-17 11:52 ` Simon Horman
2023-04-20 20:59 ` [Intel-wired-lan] " Mekala, SunithaX D
2023-04-12 8:19 ` [PATCH net-next v2 4/6] ice: sleep, don't busy-wait, for ICE_CTL_Q_SQ_CMD_TIMEOUT Michal Schmidt
2023-04-14 17:29 ` Kubalewski, Arkadiusz
2023-04-17 12:01 ` Simon Horman
2023-04-20 21:07 ` [Intel-wired-lan] " Mekala, SunithaX D
2023-04-12 8:19 ` [PATCH net-next v2 5/6] ice: remove unused buffer copy code in ice_sq_send_cmd_retry() Michal Schmidt
2023-04-14 17:29 ` Kubalewski, Arkadiusz
2023-04-17 12:02 ` Simon Horman
2023-04-20 20:59 ` [Intel-wired-lan] " Mekala, SunithaX D
2023-04-12 8:19 ` [PATCH net-next v2 6/6] ice: sleep, don't busy-wait, in the SQ send retry loop Michal Schmidt
2023-04-14 17:29 ` Kubalewski, Arkadiusz
2023-04-17 12:03 ` Simon Horman
2023-04-20 20:59 ` [Intel-wired-lan] " Mekala, SunithaX D
2023-04-14 17:29 ` [PATCH net-next v2 0/6] ice: lower CPU usage with GNSS Kubalewski, Arkadiusz
2023-04-20 20:59 ` [Intel-wired-lan] " Mekala, SunithaX D
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230412081929.173220-4-mschmidt@redhat.com \
--to=mschmidt@redhat.com \
--cc=andrew@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=karol.kolacinski@intel.com \
--cc=michal.michalik@intel.com \
--cc=netdev@vger.kernel.org \
--cc=poros@redhat.com \
--cc=simon.horman@corigine.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).