The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/qat/qat_common/qat_common_module.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* SPDX-License-Identifier: BSD-3-Clause */
    2 /* Copyright(c) 2007-2022 Intel Corporation */
    3 /* $FreeBSD$ */
    4 #include "qat_freebsd.h"
    5 #include "adf_common_drv.h"
    6 
    7 static int __init
    8 qat_common_register(void)
    9 {
   10         if (adf_init_aer())
   11                 return EFAULT;
   12 
   13         if (adf_init_fatal_error_wq())
   14                 return EFAULT;
   15 
   16         return 0;
   17 }
   18 
   19 static void __exit
   20 qat_common_unregister(void)
   21 {
   22         adf_exit_vf_wq();
   23         adf_exit_aer();
   24         adf_exit_fatal_error_wq();
   25         adf_clean_vf_map(false);
   26 }
   27 
   28 static int
   29 qat_common_modevent(module_t mod, int type, void *data)
   30 {
   31         switch (type) {
   32         case MOD_LOAD:
   33                 return qat_common_register();
   34         case MOD_UNLOAD:
   35                 qat_common_unregister();
   36                 return 0;
   37         default:
   38                 return EOPNOTSUPP;
   39         }
   40 }
   41 
   42 static moduledata_t qat_common_mod = { "qat_common", qat_common_modevent, 0 };
   43 
   44 DECLARE_MODULE(qat_common, qat_common_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
   45 MODULE_VERSION(qat_common, 1);
   46 MODULE_DEPEND(qat_common, firmware, 1, 1, 1);
   47 MODULE_DEPEND(qat_common, linuxkpi, 1, 1, 1);

Cache object: 61c7cfb0471e65bb883edf349930470a


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.