ena.c (3fc5d816f8831d6fc2816ac97bd78dc486cd080c) ena.c (433ab9b6987b42b3e5b25b8b5dc7e5178c7ef9bb)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2015-2021 Amazon.com, Inc. or its affiliates.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 3525 unchanged lines hidden (view full) ---

3534 return (rc);
3535}
3536
3537static void
3538ena_reset_task(void *arg, int pending)
3539{
3540 struct ena_adapter *adapter = (struct ena_adapter *)arg;
3541
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2015-2021 Amazon.com, Inc. or its affiliates.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 3525 unchanged lines hidden (view full) ---

3534 return (rc);
3535}
3536
3537static void
3538ena_reset_task(void *arg, int pending)
3539{
3540 struct ena_adapter *adapter = (struct ena_adapter *)arg;
3541
3542 if (unlikely(!ENA_FLAG_ISSET(ENA_FLAG_TRIGGER_RESET, adapter))) {
3543 ena_log(adapter->pdev, WARN,
3544 "device reset scheduled but trigger_reset is off\n");
3545 return;
3546 }
3547
3548 ENA_LOCK_LOCK(adapter);
3542 ENA_LOCK_LOCK(adapter);
3549 ena_destroy_device(adapter, false);
3550 ena_restore_device(adapter);
3543 if (likely(ENA_FLAG_ISSET(ENA_FLAG_TRIGGER_RESET, adapter))) {
3544 ena_destroy_device(adapter, false);
3545 ena_restore_device(adapter);
3546 }
3551 ENA_LOCK_UNLOCK(adapter);
3552}
3553
3554/**
3555 * ena_attach - Device Initialization Routine
3556 * @pdev: device information struct
3557 *
3558 * Returns 0 on success, otherwise on failure.

--- 426 unchanged lines hidden ---
3547 ENA_LOCK_UNLOCK(adapter);
3548}
3549
3550/**
3551 * ena_attach - Device Initialization Routine
3552 * @pdev: device information struct
3553 *
3554 * Returns 0 on success, otherwise on failure.

--- 426 unchanged lines hidden ---