↑ Collapse Diff ↑
 
new file 100644
1
 
/* ****************************************************************
2
 
 * Copyright 2015 VMware, Inc.
3
 
 *
4
 
 * This program is free software; you can redistribute it and/or
5
 
 * modify it under the terms of the GNU General Public License
6
 
 * as published by the Free Software Foundation; either version 2
7
 
 * of the License, or (at your option) any later version.
8
 
 * ****************************************************************/
9
 

	
10
 
#include "vmkapi.h"
11
 
#include "vmklinux_version.h"
12
 
#include <linux/module.h>
13
 
/* NOTE: __namespace.h is generated by the build from the driver's .sc file. */
14
 
#include "__namespace.h"
15
 

	
16
 
#ifndef MODULE
17
 
#error "You can only compile and link vmklinux_module with modules, which" \
18
 
       "means that MODULE has to be defined when compiling it..."
19
 
#endif
20
 

	
21
 
VMK_LICENSE_INFO(VMK_MODULE_LICENSE_GPLV2);
22
 
MODULE_VERSION2(VMKLNX_STRINGIFY(PRODUCT_VERSION), VMKLNX_MY_NAMESPACE_VERSION);
23
 

	
24
 
/*
25
 
 * All vmkdriver modules are built using the latest vmakpi interface.
26
 
 */
27
 
VMK_NAMESPACE_REQUIRED(VMK_NAMESPACE_VMKAPI, VMK_NAMESPACE_CURRENT_VERSION);
28
 
#if VMKAPI_REVISION >= VMK_REVISION_FROM_NUMBERS(2, 2, 0, 0) && \
29
 
    defined(VMK_DEVKIT_USES_BINARY_INCOMPATIBLE_APIS)
30
 
VMK_NAMESPACE_REQUIRED(VMK_NAMESPACE_VMKAPI_INCOMPAT,
31
 
                       VMK_NAMESPACE_INCOMPAT_CURRENT_VERSION);
32
 
#endif
33
 

	
34
 
vmk_ModuleID vmkshim_module_id;
35
 

	
36
 
int
37
 
vmk_early_init_module(void)
38
 
{
39
 
   VMK_ReturnStatus vmk_status;
40
 

	
41
 
   vmk_status = vmk_ModuleRegister(&vmkshim_module_id, VMKAPI_REVISION);
42
 
   if (vmk_status != VMK_OK) {
43
 
      vmk_WarningMessage("Registration failed (%#x): %s",
44
 
                          vmk_status, vmk_StatusToString(vmk_status));
45
 
      return vmk_status;
46
 
   }
47
 

	
48
 
   return 0;
49
 
}
50
 

	
51
 
int
52
 
vmk_late_cleanup_module(void)
53
 
{
54
 
   return 0;
55
 
}
56
 

	
57
 
/*
58
 
 * Symbols passed in directly from libfcoe without the need for a shim function.
59
 
 */
60
 
VMK_MODULE_EXPORT_ALIAS(fcoe_ctlr_destroy);
61
 
VMK_MODULE_EXPORT_ALIAS(fcoe_ctlr_els_send);
62
 
VMK_MODULE_EXPORT_ALIAS(fcoe_ctlr_init);
63
 
VMK_MODULE_EXPORT_ALIAS(fcoe_ctlr_link_down);
64
 
VMK_MODULE_EXPORT_ALIAS(fcoe_ctlr_link_up);
65
 
VMK_MODULE_EXPORT_ALIAS(fcoe_ctlr_recv);
66
 
VMK_MODULE_EXPORT_ALIAS(fcoe_ctlr_recv_flogi);
67
 
VMK_MODULE_EXPORT_ALIAS(fcoe_libfc_config);
68
 
VMK_MODULE_EXPORT_ALIAS(fcoe_wwn_from_mac);
69