Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * File: portdrv_pci.c |
| 3 | * Purpose: PCI Express Port Bus Driver |
| 4 | * |
| 5 | * Copyright (C) 2004 Intel |
| 6 | * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com) |
| 7 | */ |
| 8 | |
| 9 | #include <linux/module.h> |
| 10 | #include <linux/pci.h> |
| 11 | #include <linux/kernel.h> |
| 12 | #include <linux/errno.h> |
| 13 | #include <linux/pm.h> |
| 14 | #include <linux/init.h> |
| 15 | #include <linux/pcieport_if.h> |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 16 | #include <linux/aer.h> |
Rafael J. Wysocki | c39fae1 | 2010-02-17 23:40:07 +0100 | [diff] [blame] | 17 | #include <linux/dmi.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
| 19 | #include "portdrv.h" |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 20 | #include "aer/aerdrv.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | |
| 22 | /* |
| 23 | * Version Information |
| 24 | */ |
| 25 | #define DRIVER_VERSION "v1.0" |
| 26 | #define DRIVER_AUTHOR "tom.l.nguyen@intel.com" |
Stefan Assmann | 7e8af37 | 2009-12-03 18:00:10 +0100 | [diff] [blame] | 27 | #define DRIVER_DESC "PCIe Port Bus Driver" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | MODULE_AUTHOR(DRIVER_AUTHOR); |
| 29 | MODULE_DESCRIPTION(DRIVER_DESC); |
| 30 | MODULE_LICENSE("GPL"); |
| 31 | |
Rafael J. Wysocki | 79dd918 | 2010-08-21 01:51:44 +0200 | [diff] [blame^] | 32 | /* If this switch is set, PCIe port native services should not be enabled. */ |
| 33 | bool pcie_ports_disabled; |
| 34 | |
| 35 | static int __init pcie_port_setup(char *str) |
| 36 | { |
| 37 | if (!strncmp(str, "compat", 6)) |
| 38 | pcie_ports_disabled = true; |
| 39 | |
| 40 | return 1; |
| 41 | } |
| 42 | __setup("pcie_ports=", pcie_port_setup); |
| 43 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 44 | /* global data */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 46 | static int pcie_portdrv_restore_config(struct pci_dev *dev) |
| 47 | { |
| 48 | int retval; |
| 49 | |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 50 | retval = pci_enable_device(dev); |
| 51 | if (retval) |
| 52 | return retval; |
| 53 | pci_set_master(dev); |
| 54 | return 0; |
| 55 | } |
| 56 | |
Zhang, Yanmin | 0bed208 | 2006-09-28 14:35:59 +0800 | [diff] [blame] | 57 | #ifdef CONFIG_PM |
Alexey Dobriyan | 4714521 | 2009-12-14 18:00:08 -0800 | [diff] [blame] | 58 | static const struct dev_pm_ops pcie_portdrv_pm_ops = { |
Rafael J. Wysocki | 3a3c244 | 2009-02-15 22:32:48 +0100 | [diff] [blame] | 59 | .suspend = pcie_port_device_suspend, |
| 60 | .resume = pcie_port_device_resume, |
| 61 | .freeze = pcie_port_device_suspend, |
| 62 | .thaw = pcie_port_device_resume, |
| 63 | .poweroff = pcie_port_device_suspend, |
| 64 | .restore = pcie_port_device_resume, |
| 65 | }; |
Rafael J. Wysocki | a79d682 | 2008-12-27 16:28:58 +0100 | [diff] [blame] | 66 | |
Rafael J. Wysocki | 3a3c244 | 2009-02-15 22:32:48 +0100 | [diff] [blame] | 67 | #define PCIE_PORTDRV_PM_OPS (&pcie_portdrv_pm_ops) |
Rafael J. Wysocki | a79d682 | 2008-12-27 16:28:58 +0100 | [diff] [blame] | 68 | |
Rafael J. Wysocki | 3a3c244 | 2009-02-15 22:32:48 +0100 | [diff] [blame] | 69 | #else /* !PM */ |
| 70 | |
| 71 | #define PCIE_PORTDRV_PM_OPS NULL |
| 72 | #endif /* !PM */ |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 73 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 74 | /* |
| 75 | * pcie_portdrv_probe - Probe PCI-Express port devices |
| 76 | * @dev: PCI-Express port device being probed |
| 77 | * |
Hidetoshi Seto | 40da418 | 2009-12-15 11:38:04 +0900 | [diff] [blame] | 78 | * If detected invokes the pcie_port_device_register() method for |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | * this port device. |
| 80 | * |
| 81 | */ |
Kenji Kaneshige | 898294c | 2009-11-25 21:00:53 +0900 | [diff] [blame] | 82 | static int __devinit pcie_portdrv_probe(struct pci_dev *dev, |
| 83 | const struct pci_device_id *id) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 84 | { |
Kenji Kaneshige | 898294c | 2009-11-25 21:00:53 +0900 | [diff] [blame] | 85 | int status; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 86 | |
Kenji Kaneshige | 898294c | 2009-11-25 21:00:53 +0900 | [diff] [blame] | 87 | if (!pci_is_pcie(dev) || |
| 88 | ((dev->pcie_type != PCI_EXP_TYPE_ROOT_PORT) && |
| 89 | (dev->pcie_type != PCI_EXP_TYPE_UPSTREAM) && |
| 90 | (dev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM))) |
| 91 | return -ENODEV; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | |
Hidetoshi Seto | 40da418 | 2009-12-15 11:38:04 +0900 | [diff] [blame] | 93 | if (!dev->irq && dev->pin) { |
Bjorn Helgaas | 34a2e15 | 2008-08-25 15:45:20 -0600 | [diff] [blame] | 94 | dev_warn(&dev->dev, "device [%04x:%04x] has invalid IRQ; " |
Bjorn Helgaas | 34438ba | 2008-06-13 10:52:13 -0600 | [diff] [blame] | 95 | "check vendor BIOS\n", dev->vendor, dev->device); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 96 | } |
Rafael J. Wysocki | f118c0c | 2009-01-13 14:42:01 +0100 | [diff] [blame] | 97 | status = pcie_port_device_register(dev); |
| 98 | if (status) |
| 99 | return status; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 100 | |
Rafael J. Wysocki | 87d2e2e | 2009-01-13 14:43:07 +0100 | [diff] [blame] | 101 | pci_save_state(dev); |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 102 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 103 | return 0; |
| 104 | } |
| 105 | |
Hidetoshi Seto | 40da418 | 2009-12-15 11:38:04 +0900 | [diff] [blame] | 106 | static void pcie_portdrv_remove(struct pci_dev *dev) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 107 | { |
| 108 | pcie_port_device_remove(dev); |
Alex Chiang | d899871 | 2009-03-07 19:35:47 -0700 | [diff] [blame] | 109 | pci_disable_device(dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | } |
| 111 | |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 112 | static int error_detected_iter(struct device *device, void *data) |
Henrik Kretzschmar | 6085483 | 2006-07-06 18:05:51 +0400 | [diff] [blame] | 113 | { |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 114 | struct pcie_device *pcie_device; |
| 115 | struct pcie_port_service_driver *driver; |
| 116 | struct aer_broadcast_data *result_data; |
| 117 | pci_ers_result_t status; |
Henrik Kretzschmar | 6085483 | 2006-07-06 18:05:51 +0400 | [diff] [blame] | 118 | |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 119 | result_data = (struct aer_broadcast_data *) data; |
Henrik Kretzschmar | 6085483 | 2006-07-06 18:05:51 +0400 | [diff] [blame] | 120 | |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 121 | if (device->bus == &pcie_port_bus_type && device->driver) { |
| 122 | driver = to_service_driver(device->driver); |
| 123 | if (!driver || |
| 124 | !driver->err_handler || |
| 125 | !driver->err_handler->error_detected) |
| 126 | return 0; |
| 127 | |
| 128 | pcie_device = to_pcie_device(device); |
| 129 | |
| 130 | /* Forward error detected message to service drivers */ |
| 131 | status = driver->err_handler->error_detected( |
| 132 | pcie_device->port, |
| 133 | result_data->state); |
| 134 | result_data->result = |
| 135 | merge_result(result_data->result, status); |
| 136 | } |
| 137 | |
Henrik Kretzschmar | 6085483 | 2006-07-06 18:05:51 +0400 | [diff] [blame] | 138 | return 0; |
| 139 | } |
| 140 | |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 141 | static pci_ers_result_t pcie_portdrv_error_detected(struct pci_dev *dev, |
| 142 | enum pci_channel_state error) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 143 | { |
Hidetoshi Seto | 40da418 | 2009-12-15 11:38:04 +0900 | [diff] [blame] | 144 | struct aer_broadcast_data data = {error, PCI_ERS_RESULT_CAN_RECOVER}; |
| 145 | int ret; |
long | 5823d10 | 2005-06-22 09:09:54 -0700 | [diff] [blame] | 146 | |
Greg Kroah-Hartman | b19441a | 2006-08-28 11:43:25 -0700 | [diff] [blame] | 147 | /* can not fail */ |
Hidetoshi Seto | 40da418 | 2009-12-15 11:38:04 +0900 | [diff] [blame] | 148 | ret = device_for_each_child(&dev->dev, &data, error_detected_iter); |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 149 | |
Hidetoshi Seto | 40da418 | 2009-12-15 11:38:04 +0900 | [diff] [blame] | 150 | return data.result; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 151 | } |
| 152 | |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 153 | static int mmio_enabled_iter(struct device *device, void *data) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 154 | { |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 155 | struct pcie_device *pcie_device; |
| 156 | struct pcie_port_service_driver *driver; |
| 157 | pci_ers_result_t status, *result; |
| 158 | |
| 159 | result = (pci_ers_result_t *) data; |
| 160 | |
| 161 | if (device->bus == &pcie_port_bus_type && device->driver) { |
| 162 | driver = to_service_driver(device->driver); |
| 163 | if (driver && |
| 164 | driver->err_handler && |
| 165 | driver->err_handler->mmio_enabled) { |
| 166 | pcie_device = to_pcie_device(device); |
| 167 | |
| 168 | /* Forward error message to service drivers */ |
| 169 | status = driver->err_handler->mmio_enabled( |
| 170 | pcie_device->port); |
| 171 | *result = merge_result(*result, status); |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | return 0; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 176 | } |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 177 | |
| 178 | static pci_ers_result_t pcie_portdrv_mmio_enabled(struct pci_dev *dev) |
| 179 | { |
| 180 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; |
Greg Kroah-Hartman | b19441a | 2006-08-28 11:43:25 -0700 | [diff] [blame] | 181 | int retval; |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 182 | |
Greg Kroah-Hartman | b19441a | 2006-08-28 11:43:25 -0700 | [diff] [blame] | 183 | /* get true return value from &status */ |
| 184 | retval = device_for_each_child(&dev->dev, &status, mmio_enabled_iter); |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 185 | return status; |
| 186 | } |
| 187 | |
| 188 | static int slot_reset_iter(struct device *device, void *data) |
| 189 | { |
| 190 | struct pcie_device *pcie_device; |
| 191 | struct pcie_port_service_driver *driver; |
| 192 | pci_ers_result_t status, *result; |
| 193 | |
| 194 | result = (pci_ers_result_t *) data; |
| 195 | |
| 196 | if (device->bus == &pcie_port_bus_type && device->driver) { |
| 197 | driver = to_service_driver(device->driver); |
| 198 | if (driver && |
| 199 | driver->err_handler && |
| 200 | driver->err_handler->slot_reset) { |
| 201 | pcie_device = to_pcie_device(device); |
| 202 | |
| 203 | /* Forward error message to service drivers */ |
| 204 | status = driver->err_handler->slot_reset( |
| 205 | pcie_device->port); |
| 206 | *result = merge_result(*result, status); |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | return 0; |
| 211 | } |
| 212 | |
| 213 | static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) |
| 214 | { |
Zhang, Yanmin | 029091d | 2009-04-30 14:48:29 +0800 | [diff] [blame] | 215 | pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED; |
Greg Kroah-Hartman | b19441a | 2006-08-28 11:43:25 -0700 | [diff] [blame] | 216 | int retval; |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 217 | |
| 218 | /* If fatal, restore cfg space for possible link reset at upstream */ |
| 219 | if (dev->error_state == pci_channel_io_frozen) { |
Rafael J. Wysocki | e9d8288 | 2009-09-14 22:25:11 +0200 | [diff] [blame] | 220 | dev->state_saved = true; |
Rafael J. Wysocki | a79d682 | 2008-12-27 16:28:58 +0100 | [diff] [blame] | 221 | pci_restore_state(dev); |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 222 | pcie_portdrv_restore_config(dev); |
| 223 | pci_enable_pcie_error_reporting(dev); |
| 224 | } |
| 225 | |
Greg Kroah-Hartman | b19441a | 2006-08-28 11:43:25 -0700 | [diff] [blame] | 226 | /* get true return value from &status */ |
| 227 | retval = device_for_each_child(&dev->dev, &status, slot_reset_iter); |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 228 | |
| 229 | return status; |
| 230 | } |
| 231 | |
| 232 | static int resume_iter(struct device *device, void *data) |
| 233 | { |
| 234 | struct pcie_device *pcie_device; |
| 235 | struct pcie_port_service_driver *driver; |
| 236 | |
| 237 | if (device->bus == &pcie_port_bus_type && device->driver) { |
| 238 | driver = to_service_driver(device->driver); |
| 239 | if (driver && |
| 240 | driver->err_handler && |
| 241 | driver->err_handler->resume) { |
| 242 | pcie_device = to_pcie_device(device); |
| 243 | |
| 244 | /* Forward error message to service drivers */ |
| 245 | driver->err_handler->resume(pcie_device->port); |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | return 0; |
| 250 | } |
| 251 | |
| 252 | static void pcie_portdrv_err_resume(struct pci_dev *dev) |
| 253 | { |
Greg Kroah-Hartman | b19441a | 2006-08-28 11:43:25 -0700 | [diff] [blame] | 254 | int retval; |
| 255 | /* nothing to do with error value, if it ever happens */ |
| 256 | retval = device_for_each_child(&dev->dev, NULL, resume_iter); |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 257 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 258 | |
| 259 | /* |
| 260 | * LINUX Device Driver Model |
| 261 | */ |
| 262 | static const struct pci_device_id port_pci_ids[] = { { |
| 263 | /* handle any PCI-Express port */ |
| 264 | PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0), |
| 265 | }, { /* end: all zeroes */ } |
| 266 | }; |
| 267 | MODULE_DEVICE_TABLE(pci, port_pci_ids); |
| 268 | |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 269 | static struct pci_error_handlers pcie_portdrv_err_handler = { |
| 270 | .error_detected = pcie_portdrv_error_detected, |
| 271 | .mmio_enabled = pcie_portdrv_mmio_enabled, |
| 272 | .slot_reset = pcie_portdrv_slot_reset, |
| 273 | .resume = pcie_portdrv_err_resume, |
| 274 | }; |
| 275 | |
Sam Ravnborg | 3603a6a | 2007-02-27 10:19:17 +0100 | [diff] [blame] | 276 | static struct pci_driver pcie_portdriver = { |
Bjorn Helgaas | e3fb20f | 2009-10-05 16:47:34 -0600 | [diff] [blame] | 277 | .name = "pcieport", |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 278 | .id_table = &port_pci_ids[0], |
| 279 | |
| 280 | .probe = pcie_portdrv_probe, |
| 281 | .remove = pcie_portdrv_remove, |
| 282 | |
Zhang, Yanmin | 4bf3392 | 2006-07-31 15:26:16 +0800 | [diff] [blame] | 283 | .err_handler = &pcie_portdrv_err_handler, |
Rafael J. Wysocki | 3a3c244 | 2009-02-15 22:32:48 +0100 | [diff] [blame] | 284 | |
| 285 | .driver.pm = PCIE_PORTDRV_PM_OPS, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 286 | }; |
| 287 | |
Rafael J. Wysocki | c39fae1 | 2010-02-17 23:40:07 +0100 | [diff] [blame] | 288 | static int __init dmi_pcie_pme_disable_msi(const struct dmi_system_id *d) |
| 289 | { |
| 290 | pr_notice("%s detected: will not use MSI for PCIe PME signaling\n", |
| 291 | d->ident); |
| 292 | pcie_pme_disable_msi(); |
| 293 | return 0; |
| 294 | } |
| 295 | |
| 296 | static struct dmi_system_id __initdata pcie_portdrv_dmi_table[] = { |
| 297 | /* |
| 298 | * Boxes that should not use MSI for PCIe PME signaling. |
| 299 | */ |
| 300 | { |
| 301 | .callback = dmi_pcie_pme_disable_msi, |
| 302 | .ident = "MSI Wind U-100", |
| 303 | .matches = { |
| 304 | DMI_MATCH(DMI_SYS_VENDOR, |
| 305 | "MICRO-STAR INTERNATIONAL CO., LTD"), |
| 306 | DMI_MATCH(DMI_PRODUCT_NAME, "U-100"), |
| 307 | }, |
| 308 | }, |
| 309 | {} |
| 310 | }; |
| 311 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 312 | static int __init pcie_portdrv_init(void) |
| 313 | { |
Randy Dunlap | 20d5166 | 2006-07-08 22:58:25 -0700 | [diff] [blame] | 314 | int retval; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 315 | |
Rafael J. Wysocki | 79dd918 | 2010-08-21 01:51:44 +0200 | [diff] [blame^] | 316 | if (pcie_ports_disabled) |
| 317 | return -EACCES; |
| 318 | |
Rafael J. Wysocki | c39fae1 | 2010-02-17 23:40:07 +0100 | [diff] [blame] | 319 | dmi_check_system(pcie_portdrv_dmi_table); |
| 320 | |
Randy Dunlap | 20d5166 | 2006-07-08 22:58:25 -0700 | [diff] [blame] | 321 | retval = pcie_port_bus_register(); |
| 322 | if (retval) { |
| 323 | printk(KERN_WARNING "PCIE: bus_register error: %d\n", retval); |
| 324 | goto out; |
| 325 | } |
Sam Ravnborg | 3603a6a | 2007-02-27 10:19:17 +0100 | [diff] [blame] | 326 | retval = pci_register_driver(&pcie_portdriver); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 327 | if (retval) |
| 328 | pcie_port_bus_unregister(); |
Randy Dunlap | 20d5166 | 2006-07-08 22:58:25 -0700 | [diff] [blame] | 329 | out: |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 330 | return retval; |
| 331 | } |
| 332 | |
Hidetoshi Seto | 40da418 | 2009-12-15 11:38:04 +0900 | [diff] [blame] | 333 | static void __exit pcie_portdrv_exit(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 334 | { |
Sam Ravnborg | 3603a6a | 2007-02-27 10:19:17 +0100 | [diff] [blame] | 335 | pci_unregister_driver(&pcie_portdriver); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 336 | pcie_port_bus_unregister(); |
| 337 | } |
| 338 | |
| 339 | module_init(pcie_portdrv_init); |
| 340 | module_exit(pcie_portdrv_exit); |