2 * PCI Hotplug Driver for PowerPC PowerNV platform.
4 * Copyright Gavin Shan, IBM Corporation 2016.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
12 #include <linux/libfdt.h>
13 #include <linux/module.h>
14 #include <linux/pci.h>
15 #include <linux/pci_hotplug.h>
18 #include <asm/pnv-pci.h>
19 #include <asm/ppc-pci.h>
21 #define DRIVER_VERSION "0.1"
22 #define DRIVER_AUTHOR "Gavin Shan, IBM Corporation"
23 #define DRIVER_DESC "PowerPC PowerNV PCI Hotplug Driver"
25 struct pnv_php_event {
27 struct pnv_php_slot *php_slot;
28 struct work_struct work;
31 static LIST_HEAD(pnv_php_slot_list);
32 static DEFINE_SPINLOCK(pnv_php_lock);
34 static void pnv_php_register(struct device_node *dn);
35 static void pnv_php_unregister_one(struct device_node *dn);
36 static void pnv_php_unregister(struct device_node *dn);
38 static void pnv_php_disable_irq(struct pnv_php_slot *php_slot,
41 struct pci_dev *pdev = php_slot->pdev;
42 int irq = php_slot->irq;
45 if (php_slot->irq > 0) {
46 pcie_capability_read_word(pdev, PCI_EXP_SLTCTL, &ctrl);
47 ctrl &= ~(PCI_EXP_SLTCTL_HPIE |
49 PCI_EXP_SLTCTL_DLLSCE);
50 pcie_capability_write_word(pdev, PCI_EXP_SLTCTL, ctrl);
52 free_irq(php_slot->irq, php_slot);
57 destroy_workqueue(php_slot->wq);
61 if (disable_device || irq > 0) {
62 if (pdev->msix_enabled)
63 pci_disable_msix(pdev);
64 else if (pdev->msi_enabled)
65 pci_disable_msi(pdev);
67 pci_disable_device(pdev);
71 static void pnv_php_free_slot(struct kref *kref)
73 struct pnv_php_slot *php_slot = container_of(kref,
74 struct pnv_php_slot, kref);
76 WARN_ON(!list_empty(&php_slot->children));
77 pnv_php_disable_irq(php_slot, false);
78 kfree(php_slot->name);
82 static inline void pnv_php_put_slot(struct pnv_php_slot *php_slot)
88 kref_put(&php_slot->kref, pnv_php_free_slot);
91 static struct pnv_php_slot *pnv_php_match(struct device_node *dn,
92 struct pnv_php_slot *php_slot)
94 struct pnv_php_slot *target, *tmp;
96 if (php_slot->dn == dn) {
97 kref_get(&php_slot->kref);
101 list_for_each_entry(tmp, &php_slot->children, link) {
102 target = pnv_php_match(dn, tmp);
110 struct pnv_php_slot *pnv_php_find_slot(struct device_node *dn)
112 struct pnv_php_slot *php_slot, *tmp;
115 spin_lock_irqsave(&pnv_php_lock, flags);
116 list_for_each_entry(tmp, &pnv_php_slot_list, link) {
117 php_slot = pnv_php_match(dn, tmp);
119 spin_unlock_irqrestore(&pnv_php_lock, flags);
123 spin_unlock_irqrestore(&pnv_php_lock, flags);
127 EXPORT_SYMBOL_GPL(pnv_php_find_slot);
130 * Remove pdn for all children of the indicated device node.
131 * The function should remove pdn in a depth-first manner.
133 static void pnv_php_rmv_pdns(struct device_node *dn)
135 struct device_node *child;
137 for_each_child_of_node(dn, child) {
138 pnv_php_rmv_pdns(child);
140 pci_remove_device_node_info(child);
145 * Detach all child nodes of the indicated device nodes. The
146 * function should handle device nodes in depth-first manner.
148 * We should not invoke of_node_release() as the memory for
149 * individual device node is part of large memory block. The
150 * large block is allocated from memblock (system bootup) or
151 * kmalloc() when unflattening the device tree by OF changeset.
152 * We can not free the large block allocated from memblock. For
153 * later case, it should be released at once.
155 static void pnv_php_detach_device_nodes(struct device_node *parent)
157 struct device_node *dn;
160 for_each_child_of_node(parent, dn) {
161 pnv_php_detach_device_nodes(dn);
164 refcount = atomic_read(&dn->kobj.kref.refcount);
166 pr_warn("Invalid refcount %d on <%s>\n",
167 refcount, of_node_full_name(dn));
173 static void pnv_php_rmv_devtree(struct pnv_php_slot *php_slot)
175 pnv_php_rmv_pdns(php_slot->dn);
178 * Decrease the refcount if the device nodes were created
179 * through OF changeset before detaching them.
182 of_changeset_destroy(&php_slot->ocs);
183 pnv_php_detach_device_nodes(php_slot->dn);
187 kfree(php_slot->fdt);
189 php_slot->dn->child = NULL;
190 php_slot->fdt = NULL;
195 * As the nodes in OF changeset are applied in reverse order, we
196 * need revert the nodes in advance so that we have correct node
197 * order after the changeset is applied.
199 static void pnv_php_reverse_nodes(struct device_node *parent)
201 struct device_node *child, *next;
204 for_each_child_of_node(parent, child)
205 pnv_php_reverse_nodes(child);
207 /* Reverse the nodes in the child list */
208 child = parent->child;
209 parent->child = NULL;
211 next = child->sibling;
213 child->sibling = parent->child;
214 parent->child = child;
219 static int pnv_php_populate_changeset(struct of_changeset *ocs,
220 struct device_node *dn)
222 struct device_node *child;
225 for_each_child_of_node(dn, child) {
226 ret = of_changeset_attach_node(ocs, child);
230 ret = pnv_php_populate_changeset(ocs, child);
238 static void *pnv_php_add_one_pdn(struct device_node *dn, void *data)
240 struct pci_controller *hose = (struct pci_controller *)data;
243 pdn = pci_add_device_node_info(hose, dn);
245 return ERR_PTR(-ENOMEM);
250 static void pnv_php_add_pdns(struct pnv_php_slot *slot)
252 struct pci_controller *hose = pci_bus_to_host(slot->bus);
254 pci_traverse_device_nodes(slot->dn, pnv_php_add_one_pdn, hose);
257 static int pnv_php_add_devtree(struct pnv_php_slot *php_slot)
259 void *fdt, *fdt1, *dt;
262 /* We don't know the FDT blob size. We try to get it through
263 * maximal memory chunk and then copy it to another chunk that
264 * fits the real size.
266 fdt1 = kzalloc(0x10000, GFP_KERNEL);
269 dev_warn(&php_slot->pdev->dev, "Cannot alloc FDT blob\n");
273 ret = pnv_pci_get_device_tree(php_slot->dn->phandle, fdt1, 0x10000);
275 dev_warn(&php_slot->pdev->dev, "Error %d getting FDT blob\n",
280 fdt = kzalloc(fdt_totalsize(fdt1), GFP_KERNEL);
283 dev_warn(&php_slot->pdev->dev, "Cannot %d bytes memory\n",
284 fdt_totalsize(fdt1));
288 /* Unflatten device tree blob */
289 memcpy(fdt, fdt1, fdt_totalsize(fdt1));
290 dt = of_fdt_unflatten_tree(fdt, php_slot->dn, NULL);
293 dev_warn(&php_slot->pdev->dev, "Cannot unflatten FDT\n");
297 /* Initialize and apply the changeset */
298 of_changeset_init(&php_slot->ocs);
299 pnv_php_reverse_nodes(php_slot->dn);
300 ret = pnv_php_populate_changeset(&php_slot->ocs, php_slot->dn);
302 pnv_php_reverse_nodes(php_slot->dn);
303 dev_warn(&php_slot->pdev->dev, "Error %d populating changeset\n",
308 php_slot->dn->child = NULL;
309 ret = of_changeset_apply(&php_slot->ocs);
311 dev_warn(&php_slot->pdev->dev, "Error %d applying changeset\n",
313 goto destroy_changeset;
316 /* Add device node firmware data */
317 pnv_php_add_pdns(php_slot);
324 of_changeset_destroy(&php_slot->ocs);
327 php_slot->dn->child = NULL;
336 int pnv_php_set_slot_power_state(struct hotplug_slot *slot,
339 struct pnv_php_slot *php_slot = slot->private;
343 ret = pnv_pci_set_power_state(php_slot->id, state, &msg);
345 if (be64_to_cpu(msg.params[1]) != php_slot->dn->phandle ||
346 be64_to_cpu(msg.params[2]) != state ||
347 be64_to_cpu(msg.params[3]) != OPAL_SUCCESS) {
348 dev_warn(&php_slot->pdev->dev, "Wrong msg (%lld, %lld, %lld)\n",
349 be64_to_cpu(msg.params[1]),
350 be64_to_cpu(msg.params[2]),
351 be64_to_cpu(msg.params[3]));
354 } else if (ret < 0) {
355 dev_warn(&php_slot->pdev->dev, "Error %d powering %s\n",
356 ret, (state == OPAL_PCI_SLOT_POWER_ON) ? "on" : "off");
360 if (state == OPAL_PCI_SLOT_POWER_OFF || state == OPAL_PCI_SLOT_OFFLINE)
361 pnv_php_rmv_devtree(php_slot);
363 ret = pnv_php_add_devtree(php_slot);
367 EXPORT_SYMBOL_GPL(pnv_php_set_slot_power_state);
369 static int pnv_php_get_power_state(struct hotplug_slot *slot, u8 *state)
371 struct pnv_php_slot *php_slot = slot->private;
372 uint8_t power_state = OPAL_PCI_SLOT_POWER_ON;
376 * Retrieve power status from firmware. If we fail
377 * getting that, the power status fails back to
380 ret = pnv_pci_get_power_state(php_slot->id, &power_state);
382 dev_warn(&php_slot->pdev->dev, "Error %d getting power status\n",
385 *state = power_state;
386 slot->info->power_status = power_state;
392 static int pnv_php_get_adapter_state(struct hotplug_slot *slot, u8 *state)
394 struct pnv_php_slot *php_slot = slot->private;
395 uint8_t presence = OPAL_PCI_SLOT_EMPTY;
399 * Retrieve presence status from firmware. If we can't
400 * get that, it will fail back to be empty.
402 ret = pnv_pci_get_presence_state(php_slot->id, &presence);
405 slot->info->adapter_status = presence;
408 dev_warn(&php_slot->pdev->dev, "Error %d getting presence\n",
415 static int pnv_php_set_attention_state(struct hotplug_slot *slot, u8 state)
417 /* FIXME: Make it real once firmware supports it */
418 slot->info->attention_status = state;
423 static int pnv_php_enable(struct pnv_php_slot *php_slot, bool rescan)
425 struct hotplug_slot *slot = &php_slot->slot;
426 uint8_t presence = OPAL_PCI_SLOT_EMPTY;
427 uint8_t power_status = OPAL_PCI_SLOT_POWER_ON;
430 /* Check if the slot has been configured */
431 if (php_slot->state != PNV_PHP_STATE_REGISTERED)
434 /* Retrieve slot presence status */
435 ret = pnv_php_get_adapter_state(slot, &presence);
440 * Proceed if there have nothing behind the slot. However,
441 * we should leave the slot in registered state at the
442 * beginning. Otherwise, the PCI devices inserted afterwards
443 * won't be probed and populated.
445 if (presence == OPAL_PCI_SLOT_EMPTY) {
446 if (!php_slot->power_state_check) {
447 php_slot->power_state_check = true;
456 * If the power supply to the slot is off, we can't detect
457 * adapter presence state. That means we have to turn the
458 * slot on before going to probe slot's presence state.
460 * On the first time, we don't change the power status to
461 * boost system boot with assumption that the firmware
462 * supplies consistent slot power status: empty slot always
463 * has its power off and non-empty slot has its power on.
465 if (!php_slot->power_state_check) {
466 php_slot->power_state_check = true;
468 ret = pnv_php_get_power_state(slot, &power_status);
472 if (power_status != OPAL_PCI_SLOT_POWER_ON)
476 /* Check the power status. Scan the slot if it is already on */
477 ret = pnv_php_get_power_state(slot, &power_status);
481 if (power_status == OPAL_PCI_SLOT_POWER_ON)
484 /* Power is off, turn it on and then scan the slot */
485 ret = pnv_php_set_slot_power_state(slot, OPAL_PCI_SLOT_POWER_ON);
490 if (presence == OPAL_PCI_SLOT_PRESENT) {
492 pci_lock_rescan_remove();
493 pci_hp_add_devices(php_slot->bus);
494 pci_unlock_rescan_remove();
497 /* Rescan for child hotpluggable slots */
498 php_slot->state = PNV_PHP_STATE_POPULATED;
500 pnv_php_register(php_slot->dn);
502 php_slot->state = PNV_PHP_STATE_POPULATED;
508 static int pnv_php_enable_slot(struct hotplug_slot *slot)
510 struct pnv_php_slot *php_slot = container_of(slot,
511 struct pnv_php_slot, slot);
513 return pnv_php_enable(php_slot, true);
516 static int pnv_php_disable_slot(struct hotplug_slot *slot)
518 struct pnv_php_slot *php_slot = slot->private;
521 if (php_slot->state != PNV_PHP_STATE_POPULATED)
524 /* Remove all devices behind the slot */
525 pci_lock_rescan_remove();
526 pci_hp_remove_devices(php_slot->bus);
527 pci_unlock_rescan_remove();
529 /* Detach the child hotpluggable slots */
530 pnv_php_unregister(php_slot->dn);
532 /* Notify firmware and remove device nodes */
533 ret = pnv_php_set_slot_power_state(slot, OPAL_PCI_SLOT_POWER_OFF);
535 php_slot->state = PNV_PHP_STATE_REGISTERED;
539 static struct hotplug_slot_ops php_slot_ops = {
540 .get_power_status = pnv_php_get_power_state,
541 .get_adapter_status = pnv_php_get_adapter_state,
542 .set_attention_status = pnv_php_set_attention_state,
543 .enable_slot = pnv_php_enable_slot,
544 .disable_slot = pnv_php_disable_slot,
547 static void pnv_php_release(struct hotplug_slot *slot)
549 struct pnv_php_slot *php_slot = slot->private;
552 /* Remove from global or child list */
553 spin_lock_irqsave(&pnv_php_lock, flags);
554 list_del(&php_slot->link);
555 spin_unlock_irqrestore(&pnv_php_lock, flags);
557 /* Detach from parent */
558 pnv_php_put_slot(php_slot);
559 pnv_php_put_slot(php_slot->parent);
562 static struct pnv_php_slot *pnv_php_alloc_slot(struct device_node *dn)
564 struct pnv_php_slot *php_slot;
570 ret = of_property_read_string(dn, "ibm,slot-label", &label);
574 if (pnv_pci_get_slot_id(dn, &id))
577 bus = pci_find_bus_by_node(dn);
581 php_slot = kzalloc(sizeof(*php_slot), GFP_KERNEL);
585 php_slot->name = kstrdup(label, GFP_KERNEL);
586 if (!php_slot->name) {
591 if (dn->child && PCI_DN(dn->child))
592 php_slot->slot_no = PCI_SLOT(PCI_DN(dn->child)->devfn);
594 php_slot->slot_no = -1; /* Placeholder slot */
596 kref_init(&php_slot->kref);
597 php_slot->state = PNV_PHP_STATE_INITIALIZED;
599 php_slot->pdev = bus->self;
602 php_slot->power_state_check = false;
603 php_slot->slot.ops = &php_slot_ops;
604 php_slot->slot.info = &php_slot->slot_info;
605 php_slot->slot.release = pnv_php_release;
606 php_slot->slot.private = php_slot;
608 INIT_LIST_HEAD(&php_slot->children);
609 INIT_LIST_HEAD(&php_slot->link);
614 static int pnv_php_register_slot(struct pnv_php_slot *php_slot)
616 struct pnv_php_slot *parent;
617 struct device_node *dn = php_slot->dn;
621 /* Check if the slot is registered or not */
622 parent = pnv_php_find_slot(php_slot->dn);
624 pnv_php_put_slot(parent);
628 /* Register PCI slot */
629 ret = pci_hp_register(&php_slot->slot, php_slot->bus,
630 php_slot->slot_no, php_slot->name);
632 dev_warn(&php_slot->pdev->dev, "Error %d registering slot\n",
637 /* Attach to the parent's child list or global list */
638 while ((dn = of_get_parent(dn))) {
644 parent = pnv_php_find_slot(dn);
653 spin_lock_irqsave(&pnv_php_lock, flags);
654 php_slot->parent = parent;
656 list_add_tail(&php_slot->link, &parent->children);
658 list_add_tail(&php_slot->link, &pnv_php_slot_list);
659 spin_unlock_irqrestore(&pnv_php_lock, flags);
661 php_slot->state = PNV_PHP_STATE_REGISTERED;
665 static int pnv_php_enable_msix(struct pnv_php_slot *php_slot)
667 struct pci_dev *pdev = php_slot->pdev;
668 struct msix_entry entry;
672 /* Get total number of MSIx entries */
673 nr_entries = pci_msix_vec_count(pdev);
677 /* Check hotplug MSIx entry is in range */
678 pcie_capability_read_word(pdev, PCI_EXP_FLAGS, &pcie_flag);
679 entry.entry = (pcie_flag & PCI_EXP_FLAGS_IRQ) >> 9;
680 if (entry.entry >= nr_entries)
684 ret = pci_enable_msix_exact(pdev, &entry, 1);
686 dev_warn(&pdev->dev, "Error %d enabling MSIx\n", ret);
693 static void pnv_php_event_handler(struct work_struct *work)
695 struct pnv_php_event *event =
696 container_of(work, struct pnv_php_event, work);
697 struct pnv_php_slot *php_slot = event->php_slot;
700 pnv_php_enable_slot(&php_slot->slot);
702 pnv_php_disable_slot(&php_slot->slot);
707 static irqreturn_t pnv_php_interrupt(int irq, void *data)
709 struct pnv_php_slot *php_slot = data;
710 struct pci_dev *pchild, *pdev = php_slot->pdev;
711 struct eeh_dev *edev;
713 struct pnv_php_event *event;
720 pcie_capability_read_word(pdev, PCI_EXP_SLTSTA, &sts);
721 sts &= (PCI_EXP_SLTSTA_PDC | PCI_EXP_SLTSTA_DLLSC);
722 pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, sts);
723 if (sts & PCI_EXP_SLTSTA_DLLSC) {
724 pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &lsts);
725 added = !!(lsts & PCI_EXP_LNKSTA_DLLLA);
726 } else if (sts & PCI_EXP_SLTSTA_PDC) {
727 ret = pnv_pci_get_presence_state(php_slot->id, &presence);
729 dev_warn(&pdev->dev, "PCI slot [%s] error %d getting presence (0x%04x), to retry the operation.\n",
730 php_slot->name, ret, sts);
734 added = !!(presence == OPAL_PCI_SLOT_PRESENT);
739 /* Freeze the removed PE to avoid unexpected error reporting */
741 pchild = list_first_entry_or_null(&php_slot->bus->devices,
742 struct pci_dev, bus_list);
743 edev = pchild ? pci_dev_to_eeh_dev(pchild) : NULL;
744 pe = edev ? edev->pe : NULL;
746 eeh_serialize_lock(&flags);
747 eeh_pe_state_mark(pe, EEH_PE_ISOLATED);
748 eeh_serialize_unlock(flags);
749 eeh_pe_set_option(pe, EEH_OPT_FREEZE_PE);
754 * The PE is left in frozen state if the event is missed. It's
755 * fine as the PCI devices (PE) aren't functional any more.
757 event = kzalloc(sizeof(*event), GFP_ATOMIC);
759 dev_warn(&pdev->dev, "PCI slot [%s] missed hotplug event 0x%04x\n",
760 php_slot->name, sts);
764 dev_info(&pdev->dev, "PCI slot [%s] %s (IRQ: %d)\n",
765 php_slot->name, added ? "added" : "removed", irq);
766 INIT_WORK(&event->work, pnv_php_event_handler);
767 event->added = added;
768 event->php_slot = php_slot;
769 queue_work(php_slot->wq, &event->work);
774 static void pnv_php_init_irq(struct pnv_php_slot *php_slot, int irq)
776 struct pci_dev *pdev = php_slot->pdev;
780 /* Allocate workqueue */
781 php_slot->wq = alloc_workqueue("pciehp-%s", 0, 0, php_slot->name);
783 dev_warn(&pdev->dev, "Cannot alloc workqueue\n");
784 pnv_php_disable_irq(php_slot, true);
788 /* Clear pending interrupts */
789 pcie_capability_read_word(pdev, PCI_EXP_SLTSTA, &sts);
790 sts |= (PCI_EXP_SLTSTA_PDC | PCI_EXP_SLTSTA_DLLSC);
791 pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, sts);
793 /* Request the interrupt */
794 ret = request_irq(irq, pnv_php_interrupt, IRQF_SHARED,
795 php_slot->name, php_slot);
797 pnv_php_disable_irq(php_slot, true);
798 dev_warn(&pdev->dev, "Error %d enabling IRQ %d\n", ret, irq);
802 /* Enable the interrupts */
803 pcie_capability_read_word(pdev, PCI_EXP_SLTCTL, &ctrl);
804 ctrl |= (PCI_EXP_SLTCTL_HPIE |
805 PCI_EXP_SLTCTL_PDCE |
806 PCI_EXP_SLTCTL_DLLSCE);
807 pcie_capability_write_word(pdev, PCI_EXP_SLTCTL, ctrl);
809 /* The interrupt is initialized successfully when @irq is valid */
813 static void pnv_php_enable_irq(struct pnv_php_slot *php_slot)
815 struct pci_dev *pdev = php_slot->pdev;
819 * The MSI/MSIx interrupt might have been occupied by other
820 * drivers. Don't populate the surprise hotplug capability
823 if (pci_dev_msi_enabled(pdev))
826 ret = pci_enable_device(pdev);
828 dev_warn(&pdev->dev, "Error %d enabling device\n", ret);
832 pci_set_master(pdev);
834 /* Enable MSIx interrupt */
835 irq = pnv_php_enable_msix(php_slot);
837 pnv_php_init_irq(php_slot, irq);
842 * Use MSI if MSIx doesn't work. Fail back to legacy INTx
843 * if MSI doesn't work either
845 ret = pci_enable_msi(pdev);
846 if (!ret || pdev->irq) {
848 pnv_php_init_irq(php_slot, irq);
852 static int pnv_php_register_one(struct device_node *dn)
854 struct pnv_php_slot *php_slot;
858 /* Check if it's hotpluggable slot */
859 ret = of_property_read_u32(dn, "ibm,slot-pluggable", &prop32);
863 ret = of_property_read_u32(dn, "ibm,reset-by-firmware", &prop32);
867 php_slot = pnv_php_alloc_slot(dn);
871 ret = pnv_php_register_slot(php_slot);
875 ret = pnv_php_enable(php_slot, false);
877 goto unregister_slot;
879 /* Enable interrupt if the slot supports surprise hotplug */
880 ret = of_property_read_u32(dn, "ibm,slot-surprise-pluggable", &prop32);
882 pnv_php_enable_irq(php_slot);
887 pnv_php_unregister_one(php_slot->dn);
889 pnv_php_put_slot(php_slot);
893 static void pnv_php_register(struct device_node *dn)
895 struct device_node *child;
898 * The parent slots should be registered before their
901 for_each_child_of_node(dn, child) {
902 pnv_php_register_one(child);
903 pnv_php_register(child);
907 static void pnv_php_unregister_one(struct device_node *dn)
909 struct pnv_php_slot *php_slot;
911 php_slot = pnv_php_find_slot(dn);
915 php_slot->state = PNV_PHP_STATE_OFFLINE;
916 pnv_php_put_slot(php_slot);
917 pci_hp_deregister(&php_slot->slot);
920 static void pnv_php_unregister(struct device_node *dn)
922 struct device_node *child;
924 /* The child slots should go before their parent slots */
925 for_each_child_of_node(dn, child) {
926 pnv_php_unregister(child);
927 pnv_php_unregister_one(child);
931 static int __init pnv_php_init(void)
933 struct device_node *dn;
935 pr_info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
936 for_each_compatible_node(dn, NULL, "ibm,ioda2-phb")
937 pnv_php_register(dn);
942 static void __exit pnv_php_exit(void)
944 struct device_node *dn;
946 for_each_compatible_node(dn, NULL, "ibm,ioda2-phb")
947 pnv_php_unregister(dn);
950 module_init(pnv_php_init);
951 module_exit(pnv_php_exit);
953 MODULE_VERSION(DRIVER_VERSION);
954 MODULE_LICENSE("GPL v2");
955 MODULE_AUTHOR(DRIVER_AUTHOR);
956 MODULE_DESCRIPTION(DRIVER_DESC);