diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2019-08-22 01:05:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-22 03:25:12 -0400 |
commit | 348dd93e40c112afda3cd07daa6f470e474d29dc (patch) | |
tree | e4b0acc10150511e373b2137e5dc4c14ba7132d0 /drivers/pci/controller/pci-hyperv.c | |
parent | e5d2f910cfeca852f6e2dc19dfa8dab264ce0cde (diff) |
PCI: hv: Add a Hyper-V PCI interface driver for software backchannel interface
This interface driver is a helper driver allows other drivers to
have a common interface with the Hyper-V PCI frontend driver.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/pci/controller/pci-hyperv.c')
-rw-r--r-- | drivers/pci/controller/pci-hyperv.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c index 57adeca7bda9..9c93ac2215b7 100644 --- a/drivers/pci/controller/pci-hyperv.c +++ b/drivers/pci/controller/pci-hyperv.c | |||
@@ -983,7 +983,6 @@ int hv_read_config_block(struct pci_dev *pdev, void *buf, unsigned int len, | |||
983 | *bytes_returned = comp_pkt.bytes_returned; | 983 | *bytes_returned = comp_pkt.bytes_returned; |
984 | return 0; | 984 | return 0; |
985 | } | 985 | } |
986 | EXPORT_SYMBOL(hv_read_config_block); | ||
987 | 986 | ||
988 | /** | 987 | /** |
989 | * hv_pci_write_config_compl() - Invoked when a response packet for a write | 988 | * hv_pci_write_config_compl() - Invoked when a response packet for a write |
@@ -1070,7 +1069,6 @@ int hv_write_config_block(struct pci_dev *pdev, void *buf, unsigned int len, | |||
1070 | 1069 | ||
1071 | return 0; | 1070 | return 0; |
1072 | } | 1071 | } |
1073 | EXPORT_SYMBOL(hv_write_config_block); | ||
1074 | 1072 | ||
1075 | /** | 1073 | /** |
1076 | * hv_register_block_invalidate() - Invoked when a config block invalidation | 1074 | * hv_register_block_invalidate() - Invoked when a config block invalidation |
@@ -1101,7 +1099,6 @@ int hv_register_block_invalidate(struct pci_dev *pdev, void *context, | |||
1101 | return 0; | 1099 | return 0; |
1102 | 1100 | ||
1103 | } | 1101 | } |
1104 | EXPORT_SYMBOL(hv_register_block_invalidate); | ||
1105 | 1102 | ||
1106 | /* Interrupt management hooks */ | 1103 | /* Interrupt management hooks */ |
1107 | static void hv_int_desc_free(struct hv_pci_dev *hpdev, | 1104 | static void hv_int_desc_free(struct hv_pci_dev *hpdev, |
@@ -3045,10 +3042,19 @@ static struct hv_driver hv_pci_drv = { | |||
3045 | static void __exit exit_hv_pci_drv(void) | 3042 | static void __exit exit_hv_pci_drv(void) |
3046 | { | 3043 | { |
3047 | vmbus_driver_unregister(&hv_pci_drv); | 3044 | vmbus_driver_unregister(&hv_pci_drv); |
3045 | |||
3046 | hvpci_block_ops.read_block = NULL; | ||
3047 | hvpci_block_ops.write_block = NULL; | ||
3048 | hvpci_block_ops.reg_blk_invalidate = NULL; | ||
3048 | } | 3049 | } |
3049 | 3050 | ||
3050 | static int __init init_hv_pci_drv(void) | 3051 | static int __init init_hv_pci_drv(void) |
3051 | { | 3052 | { |
3053 | /* Initialize PCI block r/w interface */ | ||
3054 | hvpci_block_ops.read_block = hv_read_config_block; | ||
3055 | hvpci_block_ops.write_block = hv_write_config_block; | ||
3056 | hvpci_block_ops.reg_blk_invalidate = hv_register_block_invalidate; | ||
3057 | |||
3052 | return vmbus_driver_register(&hv_pci_drv); | 3058 | return vmbus_driver_register(&hv_pci_drv); |
3053 | } | 3059 | } |
3054 | 3060 | ||