* Ensure that all locks are released before first NVM or PHY access */
| 299 | * Ensure that all locks are released before first NVM or PHY access |
| 300 | */ |
| 301 | static void |
| 302 | ngbe_swfw_lock_reset(struct ngbe_hw *hw) |
| 303 | { |
| 304 | uint16_t mask; |
| 305 | |
| 306 | /* |
| 307 | * These ones are more tricky since they are common to all ports; but |
| 308 | * swfw_sync retries last long enough (1s) to be almost sure that if |
| 309 | * lock can not be taken it is due to an improper lock of the |
| 310 | * semaphore. |
| 311 | */ |
| 312 | mask = NGBE_MNGSEM_SWPHY | |
| 313 | NGBE_MNGSEM_SWMBX | |
| 314 | NGBE_MNGSEM_SWFLASH; |
| 315 | if (hw->mac.acquire_swfw_sync(hw, mask) < 0) |
| 316 | PMD_DRV_LOG(DEBUG, "SWFW common locks released"); |
| 317 | |
| 318 | hw->mac.release_swfw_sync(hw, mask); |
| 319 | } |
| 320 | |
| 321 | static int |
| 322 | eth_ngbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) |
no outgoing calls
no test coverage detected