ena.c (449496eb28daec8d5b852fa4be1e337c2957345c) ena.c (d412c07617eb35435668b024bc2cecda05f57f1f)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2015-2024 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

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

4025 int rc;
4026
4027 /* Make sure VLANS are not using driver */
4028 if (if_vlantrunkinuse(adapter->ifp)) {
4029 ena_log(adapter->pdev, ERR, "VLAN is in use, detach first\n");
4030 return (EBUSY);
4031 }
4032
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2015-2024 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

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

4025 int rc;
4026
4027 /* Make sure VLANS are not using driver */
4028 if (if_vlantrunkinuse(adapter->ifp)) {
4029 ena_log(adapter->pdev, ERR, "VLAN is in use, detach first\n");
4030 return (EBUSY);
4031 }
4032
4033 rc = bus_generic_detach(pdev);
4034 if (rc != 0)
4035 return (rc);
4036
4033 ether_ifdetach(adapter->ifp);
4034
4035 ifmedia_removeall(&adapter->media);
4036
4037 /* Stop timer service */
4038 ENA_LOCK_LOCK();
4039 ENA_TIMER_DRAIN(adapter);
4040 ENA_LOCK_UNLOCK();

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

4091 ena_com_delete_customer_metrics_buffer(ena_dev);
4092
4093 if_free(adapter->ifp);
4094
4095 free(ena_dev->bus, M_DEVBUF);
4096
4097 free(ena_dev, M_DEVBUF);
4098
4037 ether_ifdetach(adapter->ifp);
4038
4039 ifmedia_removeall(&adapter->media);
4040
4041 /* Stop timer service */
4042 ENA_LOCK_LOCK();
4043 ENA_TIMER_DRAIN(adapter);
4044 ENA_LOCK_UNLOCK();

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

4095 ena_com_delete_customer_metrics_buffer(ena_dev);
4096
4097 if_free(adapter->ifp);
4098
4099 free(ena_dev->bus, M_DEVBUF);
4100
4101 free(ena_dev, M_DEVBUF);
4102
4099 return (bus_generic_detach(pdev));
4103 return (0);
4100}
4101
4102/******************************************************************************
4103 ******************************** AENQ Handlers *******************************
4104 *****************************************************************************/
4105/**
4106 * ena_update_on_link_change:
4107 * Notify the network interface about the change in link status

--- 149 unchanged lines hidden ---
4104}
4105
4106/******************************************************************************
4107 ******************************** AENQ Handlers *******************************
4108 *****************************************************************************/
4109/**
4110 * ena_update_on_link_change:
4111 * Notify the network interface about the change in link status

--- 149 unchanged lines hidden ---