* Ensure that all locks are released before first NVM or PHY access */
| 461 | * Ensure that all locks are released before first NVM or PHY access |
| 462 | */ |
| 463 | static void |
| 464 | txgbe_swfw_lock_reset(struct txgbe_hw *hw) |
| 465 | { |
| 466 | uint16_t mask; |
| 467 | |
| 468 | /* |
| 469 | * These ones are more tricky since they are common to all ports; but |
| 470 | * swfw_sync retries last long enough (1s) to be almost sure that if |
| 471 | * lock can not be taken it is due to an improper lock of the |
| 472 | * semaphore. |
| 473 | */ |
| 474 | mask = TXGBE_MNGSEM_SWPHY | |
| 475 | TXGBE_MNGSEM_SWMBX | |
| 476 | TXGBE_MNGSEM_SWFLASH; |
| 477 | if (hw->mac.acquire_swfw_sync(hw, mask) < 0) |
| 478 | PMD_DRV_LOG(DEBUG, "SWFW common locks released"); |
| 479 | |
| 480 | hw->mac.release_swfw_sync(hw, mask); |
| 481 | } |
| 482 | |
| 483 | static int |
| 484 | txgbe_handle_devarg(__rte_unused const char *key, const char *value, |
no outgoing calls
no test coverage detected