xenbus.c (251f39fe42dae863bd24e30864e6b66076ba076d) | xenbus.c (73db144b58a32fc39733db6a7e1fe582072ad26a) |
---|---|
1/* 2 * PCI Backend Xenbus Setup - handles setup with frontend and xend 3 * 4 * Author: Ryan Wilson <hap9@epoch.ncsc.mil> 5 */ 6#include <linux/module.h> 7#include <linux/init.h> 8#include <linux/list.h> --- 693 unchanged lines hidden (view full) --- 702 struct xen_pcibk_device *pdev = dev_get_drvdata(&dev->dev); 703 704 if (pdev != NULL) 705 free_pdev(pdev); 706 707 return 0; 708} 709 | 1/* 2 * PCI Backend Xenbus Setup - handles setup with frontend and xend 3 * 4 * Author: Ryan Wilson <hap9@epoch.ncsc.mil> 5 */ 6#include <linux/module.h> 7#include <linux/init.h> 8#include <linux/list.h> --- 693 unchanged lines hidden (view full) --- 702 struct xen_pcibk_device *pdev = dev_get_drvdata(&dev->dev); 703 704 if (pdev != NULL) 705 free_pdev(pdev); 706 707 return 0; 708} 709 |
710static const struct xenbus_device_id xenpci_ids[] = { | 710static const struct xenbus_device_id xen_pcibk_ids[] = { |
711 {"pci"}, 712 {""}, 713}; 714 | 711 {"pci"}, 712 {""}, 713}; 714 |
715static struct xenbus_driver xenbus_xen_pcibk_driver = { 716 .name = DRV_NAME, 717 .owner = THIS_MODULE, 718 .ids = xenpci_ids, | 715static DEFINE_XENBUS_DRIVER(xen_pcibk, DRV_NAME, |
719 .probe = xen_pcibk_xenbus_probe, 720 .remove = xen_pcibk_xenbus_remove, 721 .otherend_changed = xen_pcibk_frontend_changed, | 716 .probe = xen_pcibk_xenbus_probe, 717 .remove = xen_pcibk_xenbus_remove, 718 .otherend_changed = xen_pcibk_frontend_changed, |
722}; | 719); |
723 724const struct xen_pcibk_backend *__read_mostly xen_pcibk_backend; 725 726int __init xen_pcibk_xenbus_register(void) 727{ 728 xen_pcibk_wq = create_workqueue("xen_pciback_workqueue"); 729 if (!xen_pcibk_wq) { 730 printk(KERN_ERR "%s: create" 731 "xen_pciback_workqueue failed\n", __func__); 732 return -EFAULT; 733 } 734 xen_pcibk_backend = &xen_pcibk_vpci_backend; 735 if (passthrough) 736 xen_pcibk_backend = &xen_pcibk_passthrough_backend; 737 pr_info(DRV_NAME ": backend is %s\n", xen_pcibk_backend->name); | 720 721const struct xen_pcibk_backend *__read_mostly xen_pcibk_backend; 722 723int __init xen_pcibk_xenbus_register(void) 724{ 725 xen_pcibk_wq = create_workqueue("xen_pciback_workqueue"); 726 if (!xen_pcibk_wq) { 727 printk(KERN_ERR "%s: create" 728 "xen_pciback_workqueue failed\n", __func__); 729 return -EFAULT; 730 } 731 xen_pcibk_backend = &xen_pcibk_vpci_backend; 732 if (passthrough) 733 xen_pcibk_backend = &xen_pcibk_passthrough_backend; 734 pr_info(DRV_NAME ": backend is %s\n", xen_pcibk_backend->name); |
738 return xenbus_register_backend(&xenbus_xen_pcibk_driver); | 735 return xenbus_register_backend(&xen_pcibk_driver); |
739} 740 741void __exit xen_pcibk_xenbus_unregister(void) 742{ 743 destroy_workqueue(xen_pcibk_wq); | 736} 737 738void __exit xen_pcibk_xenbus_unregister(void) 739{ 740 destroy_workqueue(xen_pcibk_wq); |
744 xenbus_unregister_driver(&xenbus_xen_pcibk_driver); | 741 xenbus_unregister_driver(&xen_pcibk_driver); |
745} | 742} |