[PATCH 3/7] net: e1000: do not actually acquire/put swfw_sync on 8254x cards

Denis Orlov denorl2009 at gmail.com
Wed Jul 20 06:30:56 PDT 2022


There is no Software-Firmware Synchronization register on these
controllers.

Signed-off-by: Denis Orlov <denorl2009 at gmail.com>
---
 drivers/net/e1000/main.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
index 3b45fb3b51..4ca598eb2f 100644
--- a/drivers/net/e1000/main.c
+++ b/drivers/net/e1000/main.c
@@ -245,6 +245,10 @@ int32_t e1000_swfw_sync_acquire(struct e1000_hw *hw, uint16_t mask)
 	int32_t timeout = 200;
 
 	DEBUGFUNC();
+
+	if (hw->mac_type <= e1000_82547_rev_2)
+		return E1000_SUCCESS;
+
 	while (timeout) {
 		if (e1000_get_hw_eeprom_semaphore(hw))
 			return -E1000_ERR_SWFW_SYNC;
@@ -276,6 +280,9 @@ int32_t e1000_swfw_sync_release(struct e1000_hw *hw, uint16_t mask)
 {
 	uint32_t swfw_sync;
 
+	if (hw->mac_type <= e1000_82547_rev_2)
+		return E1000_SUCCESS;
+
 	if (e1000_get_hw_eeprom_semaphore(hw))
 		return -E1000_ERR_SWFW_SYNC;
 
-- 
2.20.1




More information about the barebox mailing list