MCPcopy Create free account
hub / github.com/F-Stack/f-stack / txgbe_swfw_lock_reset

Function txgbe_swfw_lock_reset

dpdk/drivers/net/txgbe/txgbe_ethdev.c:463–481  ·  view source on GitHub ↗

* Ensure that all locks are released before first NVM or PHY access */

Source from the content-addressed store, hash-verified

461 * Ensure that all locks are released before first NVM or PHY access
462 */
463static void
464txgbe_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
483static int
484txgbe_handle_devarg(__rte_unused const char *key, const char *value,

Callers 2

eth_txgbe_dev_initFunction · 0.85
txgbe_dev_closeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected