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

Function ngbe_swfw_lock_reset

dpdk/drivers/net/ngbe/ngbe_ethdev.c:301–319  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

299 * Ensure that all locks are released before first NVM or PHY access
300 */
301static void
302ngbe_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
321static int
322eth_ngbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)

Callers 2

eth_ngbe_dev_initFunction · 0.85
ngbe_dev_closeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected