From: Jiawen Wu <jiawenwu@trustnetic.com>
To: dev@dpdk.org
Cc: Jiawen Wu <jiawenwu@trustnetic.com>, stable@dpdk.org
Subject: [PATCH 6/9] net/ngbe: remove semaphore between SW/FW
Date: Fri, 2 Sep 2022 11:00:08 +0800 [thread overview]
Message-ID: <20220902030011.377523-7-jiawenwu@trustnetic.com> (raw)
In-Reply-To: <20220902030011.377523-1-jiawenwu@trustnetic.com>
Since firmware does not use the semaphore between software and firmware.
Remove useless unilateral semaphore setting.
Fixes: f501a195bded ("net/ngbe: initialize and validate EEPROM")
Cc: stable@dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ngbe/base/ngbe_eeprom.c | 32 -----------------------------
1 file changed, 32 deletions(-)
diff --git a/drivers/net/ngbe/base/ngbe_eeprom.c b/drivers/net/ngbe/base/ngbe_eeprom.c
index 6375ee9b29..104501fa7a 100644
--- a/drivers/net/ngbe/base/ngbe_eeprom.c
+++ b/drivers/net/ngbe/base/ngbe_eeprom.c
@@ -105,37 +105,6 @@ s32 ngbe_get_eeprom_semaphore(struct ngbe_hw *hw)
status = 0;
}
- /* Now get the semaphore between SW/FW through the SWESMBI bit */
- if (status == 0) {
- for (i = 0; i < timeout; i++) {
- /* Set the SW EEPROM semaphore bit to request access */
- wr32m(hw, NGBE_MNGSWSYNC,
- NGBE_MNGSWSYNC_REQ, NGBE_MNGSWSYNC_REQ);
-
- /*
- * If we set the bit successfully then we got the
- * semaphore.
- */
- swsm = rd32(hw, NGBE_MNGSWSYNC);
- if (swsm & NGBE_MNGSWSYNC_REQ)
- break;
-
- usec_delay(50);
- }
-
- /*
- * Release semaphores and return error if SW EEPROM semaphore
- * was not granted because we don't have access to the EEPROM
- */
- if (i >= timeout) {
- DEBUGOUT("SWESMBI Software EEPROM semaphore not granted.");
- ngbe_release_eeprom_semaphore(hw);
- status = NGBE_ERR_EEPROM;
- }
- } else {
- DEBUGOUT("Software semaphore SMBI between device drivers not granted.");
- }
-
return status;
}
@@ -147,7 +116,6 @@ s32 ngbe_get_eeprom_semaphore(struct ngbe_hw *hw)
**/
void ngbe_release_eeprom_semaphore(struct ngbe_hw *hw)
{
- wr32m(hw, NGBE_MNGSWSYNC, NGBE_MNGSWSYNC_REQ, 0);
wr32m(hw, NGBE_SWSEM, NGBE_SWSEM_PF, 0);
ngbe_flush(hw);
}
--
2.27.0
next prev parent reply other threads:[~2022-09-02 3:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-02 3:00 [PATCH 0/9] Wangxun fixes and supports Jiawen Wu
2022-09-02 3:00 ` [PATCH 1/9] net/txgbe: fix IPv6 rule in flow director Jiawen Wu
2022-09-02 3:00 ` [PATCH 2/9] net/txgbe: fix OEM customized LED Jiawen Wu
2022-09-02 3:00 ` [PATCH 3/9] net/txgbe: remove semaphore between SW/FW Jiawen Wu
2022-09-02 3:00 ` [PATCH 4/9] net/txgbe: rename some extended statistic Jiawen Wu
2022-09-02 3:00 ` [PATCH 5/9] net/ngbe: " Jiawen Wu
2022-09-02 3:00 ` Jiawen Wu [this message]
2022-09-02 3:00 ` [PATCH 7/9] net/ngbe: fix max frame size Jiawen Wu
2022-09-02 3:00 ` [PATCH 8/9] net/ngbe: fix YT PHY mixed mode occasionally failing link Jiawen Wu
2022-09-02 3:00 ` [PATCH 9/9] net/ngbe: support to set link down/up Jiawen Wu
2022-09-21 11:46 ` Ferruh Yigit
2022-09-13 1:55 ` [PATCH 0/9] Wangxun fixes and supports Jiawen Wu
2022-09-21 11:48 ` Ferruh Yigit
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=20220902030011.377523-7-jiawenwu@trustnetic.com \
--to=jiawenwu@trustnetic.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/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).