[3/9] net/txgbe: remove semaphore between SW/FW
Checks
Commit Message
Since firmware does not use the semaphore between software and firmware.
Remove useless unilateral semaphore setting.
Fixes: 35c90ecccfd4 ("net/txgbe: add EEPROM functions")
Cc: stable@dpdk.org
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/txgbe/base/txgbe_eeprom.c | 32 ---------------------------
1 file changed, 32 deletions(-)
@@ -111,37 +111,6 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_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, TXGBE_MNGSWSYNC,
- TXGBE_MNGSWSYNC_REQ, TXGBE_MNGSWSYNC_REQ);
-
- /*
- * If we set the bit successfully then we got the
- * semaphore.
- */
- swsm = rd32(hw, TXGBE_MNGSWSYNC);
- if (swsm & TXGBE_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.");
- txgbe_release_eeprom_semaphore(hw);
- status = TXGBE_ERR_EEPROM;
- }
- } else {
- DEBUGOUT("Software semaphore SMBI between device drivers not granted.");
- }
-
return status;
}
@@ -153,7 +122,6 @@ s32 txgbe_get_eeprom_semaphore(struct txgbe_hw *hw)
**/
void txgbe_release_eeprom_semaphore(struct txgbe_hw *hw)
{
- wr32m(hw, TXGBE_MNGSWSYNC, TXGBE_MNGSWSYNC_REQ, 0);
wr32m(hw, TXGBE_SWSEM, TXGBE_SWSEM_PF, 0);
txgbe_flush(hw);
}