cpci_hotplug_core.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730
  1. /*
  2. * CompactPCI Hot Plug Driver
  3. *
  4. * Copyright (C) 2002,2005 SOMA Networks, Inc.
  5. * Copyright (C) 2001 Greg Kroah-Hartman (greg@kroah.com)
  6. * Copyright (C) 2001 IBM Corp.
  7. *
  8. * All rights reserved.
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License as published by
  12. * the Free Software Foundation; either version 2 of the License, or (at
  13. * your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful, but
  16. * WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  18. * NON INFRINGEMENT. See the GNU General Public License for more
  19. * details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  24. *
  25. * Send feedback to <scottm@somanetworks.com>
  26. */
  27. #include <linux/module.h>
  28. #include <linux/kernel.h>
  29. #include <linux/slab.h>
  30. #include <linux/pci.h>
  31. #include <linux/pci_hotplug.h>
  32. #include <linux/init.h>
  33. #include <linux/interrupt.h>
  34. #include <linux/atomic.h>
  35. #include <linux/delay.h>
  36. #include <linux/kthread.h>
  37. #include "cpci_hotplug.h"
  38. #define DRIVER_AUTHOR "Scott Murray <scottm@somanetworks.com>"
  39. #define DRIVER_DESC "CompactPCI Hot Plug Core"
  40. #define MY_NAME "cpci_hotplug"
  41. #define dbg(format, arg...) \
  42. do { \
  43. if (cpci_debug) \
  44. printk (KERN_DEBUG "%s: " format "\n", \
  45. MY_NAME , ## arg); \
  46. } while (0)
  47. #define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
  48. #define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
  49. #define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
  50. /* local variables */
  51. static DECLARE_RWSEM(list_rwsem);
  52. static LIST_HEAD(slot_list);
  53. static int slots;
  54. static atomic_t extracting;
  55. int cpci_debug;
  56. static struct cpci_hp_controller *controller;
  57. static struct task_struct *cpci_thread;
  58. static int thread_finished;
  59. static int enable_slot(struct hotplug_slot *slot);
  60. static int disable_slot(struct hotplug_slot *slot);
  61. static int set_attention_status(struct hotplug_slot *slot, u8 value);
  62. static int get_power_status(struct hotplug_slot *slot, u8 * value);
  63. static int get_attention_status(struct hotplug_slot *slot, u8 * value);
  64. static int get_adapter_status(struct hotplug_slot *slot, u8 * value);
  65. static int get_latch_status(struct hotplug_slot *slot, u8 * value);
  66. static struct hotplug_slot_ops cpci_hotplug_slot_ops = {
  67. .enable_slot = enable_slot,
  68. .disable_slot = disable_slot,
  69. .set_attention_status = set_attention_status,
  70. .get_power_status = get_power_status,
  71. .get_attention_status = get_attention_status,
  72. .get_adapter_status = get_adapter_status,
  73. .get_latch_status = get_latch_status,
  74. };
  75. static int
  76. update_latch_status(struct hotplug_slot *hotplug_slot, u8 value)
  77. {
  78. struct hotplug_slot_info info;
  79. memcpy(&info, hotplug_slot->info, sizeof(struct hotplug_slot_info));
  80. info.latch_status = value;
  81. return pci_hp_change_slot_info(hotplug_slot, &info);
  82. }
  83. static int
  84. update_adapter_status(struct hotplug_slot *hotplug_slot, u8 value)
  85. {
  86. struct hotplug_slot_info info;
  87. memcpy(&info, hotplug_slot->info, sizeof(struct hotplug_slot_info));
  88. info.adapter_status = value;
  89. return pci_hp_change_slot_info(hotplug_slot, &info);
  90. }
  91. static int
  92. enable_slot(struct hotplug_slot *hotplug_slot)
  93. {
  94. struct slot *slot = hotplug_slot->private;
  95. int retval = 0;
  96. dbg("%s - physical_slot = %s", __func__, slot_name(slot));
  97. if (controller->ops->set_power)
  98. retval = controller->ops->set_power(slot, 1);
  99. return retval;
  100. }
  101. static int
  102. disable_slot(struct hotplug_slot *hotplug_slot)
  103. {
  104. struct slot *slot = hotplug_slot->private;
  105. int retval = 0;
  106. dbg("%s - physical_slot = %s", __func__, slot_name(slot));
  107. down_write(&list_rwsem);
  108. /* Unconfigure device */
  109. dbg("%s - unconfiguring slot %s", __func__, slot_name(slot));
  110. if ((retval = cpci_unconfigure_slot(slot))) {
  111. err("%s - could not unconfigure slot %s",
  112. __func__, slot_name(slot));
  113. goto disable_error;
  114. }
  115. dbg("%s - finished unconfiguring slot %s", __func__, slot_name(slot));
  116. /* Clear EXT (by setting it) */
  117. if (cpci_clear_ext(slot)) {
  118. err("%s - could not clear EXT for slot %s",
  119. __func__, slot_name(slot));
  120. retval = -ENODEV;
  121. goto disable_error;
  122. }
  123. cpci_led_on(slot);
  124. if (controller->ops->set_power)
  125. if ((retval = controller->ops->set_power(slot, 0)))
  126. goto disable_error;
  127. if (update_adapter_status(slot->hotplug_slot, 0))
  128. warn("failure to update adapter file");
  129. if (slot->extracting) {
  130. slot->extracting = 0;
  131. atomic_dec(&extracting);
  132. }
  133. disable_error:
  134. up_write(&list_rwsem);
  135. return retval;
  136. }
  137. static u8
  138. cpci_get_power_status(struct slot *slot)
  139. {
  140. u8 power = 1;
  141. if (controller->ops->get_power)
  142. power = controller->ops->get_power(slot);
  143. return power;
  144. }
  145. static int
  146. get_power_status(struct hotplug_slot *hotplug_slot, u8 * value)
  147. {
  148. struct slot *slot = hotplug_slot->private;
  149. *value = cpci_get_power_status(slot);
  150. return 0;
  151. }
  152. static int
  153. get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value)
  154. {
  155. struct slot *slot = hotplug_slot->private;
  156. *value = cpci_get_attention_status(slot);
  157. return 0;
  158. }
  159. static int
  160. set_attention_status(struct hotplug_slot *hotplug_slot, u8 status)
  161. {
  162. return cpci_set_attention_status(hotplug_slot->private, status);
  163. }
  164. static int
  165. get_adapter_status(struct hotplug_slot *hotplug_slot, u8 * value)
  166. {
  167. *value = hotplug_slot->info->adapter_status;
  168. return 0;
  169. }
  170. static int
  171. get_latch_status(struct hotplug_slot *hotplug_slot, u8 * value)
  172. {
  173. *value = hotplug_slot->info->latch_status;
  174. return 0;
  175. }
  176. static void release_slot(struct hotplug_slot *hotplug_slot)
  177. {
  178. struct slot *slot = hotplug_slot->private;
  179. kfree(slot->hotplug_slot->info);
  180. kfree(slot->hotplug_slot);
  181. if (slot->dev)
  182. pci_dev_put(slot->dev);
  183. kfree(slot);
  184. }
  185. #define SLOT_NAME_SIZE 6
  186. int
  187. cpci_hp_register_bus(struct pci_bus *bus, u8 first, u8 last)
  188. {
  189. struct slot *slot;
  190. struct hotplug_slot *hotplug_slot;
  191. struct hotplug_slot_info *info;
  192. char name[SLOT_NAME_SIZE];
  193. int status;
  194. int i;
  195. if (!(controller && bus))
  196. return -ENODEV;
  197. /*
  198. * Create a structure for each slot, and register that slot
  199. * with the pci_hotplug subsystem.
  200. */
  201. for (i = first; i <= last; ++i) {
  202. slot = kzalloc(sizeof (struct slot), GFP_KERNEL);
  203. if (!slot) {
  204. status = -ENOMEM;
  205. goto error;
  206. }
  207. hotplug_slot =
  208. kzalloc(sizeof (struct hotplug_slot), GFP_KERNEL);
  209. if (!hotplug_slot) {
  210. status = -ENOMEM;
  211. goto error_slot;
  212. }
  213. slot->hotplug_slot = hotplug_slot;
  214. info = kzalloc(sizeof (struct hotplug_slot_info), GFP_KERNEL);
  215. if (!info) {
  216. status = -ENOMEM;
  217. goto error_hpslot;
  218. }
  219. hotplug_slot->info = info;
  220. slot->bus = bus;
  221. slot->number = i;
  222. slot->devfn = PCI_DEVFN(i, 0);
  223. snprintf(name, SLOT_NAME_SIZE, "%02x:%02x", bus->number, i);
  224. hotplug_slot->private = slot;
  225. hotplug_slot->release = &release_slot;
  226. hotplug_slot->ops = &cpci_hotplug_slot_ops;
  227. /*
  228. * Initialize the slot info structure with some known
  229. * good values.
  230. */
  231. dbg("initializing slot %s", name);
  232. info->power_status = cpci_get_power_status(slot);
  233. info->attention_status = cpci_get_attention_status(slot);
  234. dbg("registering slot %s", name);
  235. status = pci_hp_register(slot->hotplug_slot, bus, i, name);
  236. if (status) {
  237. err("pci_hp_register failed with error %d", status);
  238. goto error_info;
  239. }
  240. dbg("slot registered with name: %s", slot_name(slot));
  241. /* Add slot to our internal list */
  242. down_write(&list_rwsem);
  243. list_add(&slot->slot_list, &slot_list);
  244. slots++;
  245. up_write(&list_rwsem);
  246. }
  247. return 0;
  248. error_info:
  249. kfree(info);
  250. error_hpslot:
  251. kfree(hotplug_slot);
  252. error_slot:
  253. kfree(slot);
  254. error:
  255. return status;
  256. }
  257. int
  258. cpci_hp_unregister_bus(struct pci_bus *bus)
  259. {
  260. struct slot *slot;
  261. struct slot *tmp;
  262. int status = 0;
  263. down_write(&list_rwsem);
  264. if (!slots) {
  265. up_write(&list_rwsem);
  266. return -1;
  267. }
  268. list_for_each_entry_safe(slot, tmp, &slot_list, slot_list) {
  269. if (slot->bus == bus) {
  270. list_del(&slot->slot_list);
  271. slots--;
  272. dbg("deregistering slot %s", slot_name(slot));
  273. status = pci_hp_deregister(slot->hotplug_slot);
  274. if (status) {
  275. err("pci_hp_deregister failed with error %d",
  276. status);
  277. break;
  278. }
  279. }
  280. }
  281. up_write(&list_rwsem);
  282. return status;
  283. }
  284. /* This is the interrupt mode interrupt handler */
  285. static irqreturn_t
  286. cpci_hp_intr(int irq, void *data)
  287. {
  288. dbg("entered cpci_hp_intr");
  289. /* Check to see if it was our interrupt */
  290. if ((controller->irq_flags & IRQF_SHARED) &&
  291. !controller->ops->check_irq(controller->dev_id)) {
  292. dbg("exited cpci_hp_intr, not our interrupt");
  293. return IRQ_NONE;
  294. }
  295. /* Disable ENUM interrupt */
  296. controller->ops->disable_irq();
  297. /* Trigger processing by the event thread */
  298. wake_up_process(cpci_thread);
  299. return IRQ_HANDLED;
  300. }
  301. /*
  302. * According to PICMG 2.1 R2.0, section 6.3.2, upon
  303. * initialization, the system driver shall clear the
  304. * INS bits of the cold-inserted devices.
  305. */
  306. static int
  307. init_slots(int clear_ins)
  308. {
  309. struct slot *slot;
  310. struct pci_dev* dev;
  311. dbg("%s - enter", __func__);
  312. down_read(&list_rwsem);
  313. if (!slots) {
  314. up_read(&list_rwsem);
  315. return -1;
  316. }
  317. list_for_each_entry(slot, &slot_list, slot_list) {
  318. dbg("%s - looking at slot %s", __func__, slot_name(slot));
  319. if (clear_ins && cpci_check_and_clear_ins(slot))
  320. dbg("%s - cleared INS for slot %s",
  321. __func__, slot_name(slot));
  322. dev = pci_get_slot(slot->bus, PCI_DEVFN(slot->number, 0));
  323. if (dev) {
  324. if (update_adapter_status(slot->hotplug_slot, 1))
  325. warn("failure to update adapter file");
  326. if (update_latch_status(slot->hotplug_slot, 1))
  327. warn("failure to update latch file");
  328. slot->dev = dev;
  329. }
  330. }
  331. up_read(&list_rwsem);
  332. dbg("%s - exit", __func__);
  333. return 0;
  334. }
  335. static int
  336. check_slots(void)
  337. {
  338. struct slot *slot;
  339. int extracted;
  340. int inserted;
  341. u16 hs_csr;
  342. down_read(&list_rwsem);
  343. if (!slots) {
  344. up_read(&list_rwsem);
  345. err("no slots registered, shutting down");
  346. return -1;
  347. }
  348. extracted = inserted = 0;
  349. list_for_each_entry(slot, &slot_list, slot_list) {
  350. dbg("%s - looking at slot %s", __func__, slot_name(slot));
  351. if (cpci_check_and_clear_ins(slot)) {
  352. /*
  353. * Some broken hardware (e.g. PLX 9054AB) asserts
  354. * ENUM# twice...
  355. */
  356. if (slot->dev) {
  357. warn("slot %s already inserted",
  358. slot_name(slot));
  359. inserted++;
  360. continue;
  361. }
  362. /* Process insertion */
  363. dbg("%s - slot %s inserted", __func__, slot_name(slot));
  364. /* GSM, debug */
  365. hs_csr = cpci_get_hs_csr(slot);
  366. dbg("%s - slot %s HS_CSR (1) = %04x",
  367. __func__, slot_name(slot), hs_csr);
  368. /* Configure device */
  369. dbg("%s - configuring slot %s",
  370. __func__, slot_name(slot));
  371. if (cpci_configure_slot(slot)) {
  372. err("%s - could not configure slot %s",
  373. __func__, slot_name(slot));
  374. continue;
  375. }
  376. dbg("%s - finished configuring slot %s",
  377. __func__, slot_name(slot));
  378. /* GSM, debug */
  379. hs_csr = cpci_get_hs_csr(slot);
  380. dbg("%s - slot %s HS_CSR (2) = %04x",
  381. __func__, slot_name(slot), hs_csr);
  382. if (update_latch_status(slot->hotplug_slot, 1))
  383. warn("failure to update latch file");
  384. if (update_adapter_status(slot->hotplug_slot, 1))
  385. warn("failure to update adapter file");
  386. cpci_led_off(slot);
  387. /* GSM, debug */
  388. hs_csr = cpci_get_hs_csr(slot);
  389. dbg("%s - slot %s HS_CSR (3) = %04x",
  390. __func__, slot_name(slot), hs_csr);
  391. inserted++;
  392. } else if (cpci_check_ext(slot)) {
  393. /* Process extraction request */
  394. dbg("%s - slot %s extracted",
  395. __func__, slot_name(slot));
  396. /* GSM, debug */
  397. hs_csr = cpci_get_hs_csr(slot);
  398. dbg("%s - slot %s HS_CSR = %04x",
  399. __func__, slot_name(slot), hs_csr);
  400. if (!slot->extracting) {
  401. if (update_latch_status(slot->hotplug_slot, 0)) {
  402. warn("failure to update latch file");
  403. }
  404. slot->extracting = 1;
  405. atomic_inc(&extracting);
  406. }
  407. extracted++;
  408. } else if (slot->extracting) {
  409. hs_csr = cpci_get_hs_csr(slot);
  410. if (hs_csr == 0xffff) {
  411. /*
  412. * Hmmm, we're likely hosed at this point, should we
  413. * bother trying to tell the driver or not?
  414. */
  415. err("card in slot %s was improperly removed",
  416. slot_name(slot));
  417. if (update_adapter_status(slot->hotplug_slot, 0))
  418. warn("failure to update adapter file");
  419. slot->extracting = 0;
  420. atomic_dec(&extracting);
  421. }
  422. }
  423. }
  424. up_read(&list_rwsem);
  425. dbg("inserted=%d, extracted=%d, extracting=%d",
  426. inserted, extracted, atomic_read(&extracting));
  427. if (inserted || extracted)
  428. return extracted;
  429. else if (!atomic_read(&extracting)) {
  430. err("cannot find ENUM# source, shutting down");
  431. return -1;
  432. }
  433. return 0;
  434. }
  435. /* This is the interrupt mode worker thread body */
  436. static int
  437. event_thread(void *data)
  438. {
  439. int rc;
  440. dbg("%s - event thread started", __func__);
  441. while (1) {
  442. dbg("event thread sleeping");
  443. set_current_state(TASK_INTERRUPTIBLE);
  444. schedule();
  445. if (kthread_should_stop())
  446. break;
  447. do {
  448. rc = check_slots();
  449. if (rc > 0) {
  450. /* Give userspace a chance to handle extraction */
  451. msleep(500);
  452. } else if (rc < 0) {
  453. dbg("%s - error checking slots", __func__);
  454. thread_finished = 1;
  455. goto out;
  456. }
  457. } while (atomic_read(&extracting) && !kthread_should_stop());
  458. if (kthread_should_stop())
  459. break;
  460. /* Re-enable ENUM# interrupt */
  461. dbg("%s - re-enabling irq", __func__);
  462. controller->ops->enable_irq();
  463. }
  464. out:
  465. return 0;
  466. }
  467. /* This is the polling mode worker thread body */
  468. static int
  469. poll_thread(void *data)
  470. {
  471. int rc;
  472. while (1) {
  473. if (kthread_should_stop() || signal_pending(current))
  474. break;
  475. if (controller->ops->query_enum()) {
  476. do {
  477. rc = check_slots();
  478. if (rc > 0) {
  479. /* Give userspace a chance to handle extraction */
  480. msleep(500);
  481. } else if (rc < 0) {
  482. dbg("%s - error checking slots", __func__);
  483. thread_finished = 1;
  484. goto out;
  485. }
  486. } while (atomic_read(&extracting) && !kthread_should_stop());
  487. }
  488. msleep(100);
  489. }
  490. out:
  491. return 0;
  492. }
  493. static int
  494. cpci_start_thread(void)
  495. {
  496. if (controller->irq)
  497. cpci_thread = kthread_run(event_thread, NULL, "cpci_hp_eventd");
  498. else
  499. cpci_thread = kthread_run(poll_thread, NULL, "cpci_hp_polld");
  500. if (IS_ERR(cpci_thread)) {
  501. err("Can't start up our thread");
  502. return PTR_ERR(cpci_thread);
  503. }
  504. thread_finished = 0;
  505. return 0;
  506. }
  507. static void
  508. cpci_stop_thread(void)
  509. {
  510. kthread_stop(cpci_thread);
  511. thread_finished = 1;
  512. }
  513. int
  514. cpci_hp_register_controller(struct cpci_hp_controller *new_controller)
  515. {
  516. int status = 0;
  517. if (controller)
  518. return -1;
  519. if (!(new_controller && new_controller->ops))
  520. return -EINVAL;
  521. if (new_controller->irq) {
  522. if (!(new_controller->ops->enable_irq &&
  523. new_controller->ops->disable_irq))
  524. status = -EINVAL;
  525. if (request_irq(new_controller->irq,
  526. cpci_hp_intr,
  527. new_controller->irq_flags,
  528. MY_NAME,
  529. new_controller->dev_id)) {
  530. err("Can't get irq %d for the hotplug cPCI controller",
  531. new_controller->irq);
  532. status = -ENODEV;
  533. }
  534. dbg("%s - acquired controller irq %d",
  535. __func__, new_controller->irq);
  536. }
  537. if (!status)
  538. controller = new_controller;
  539. return status;
  540. }
  541. static void
  542. cleanup_slots(void)
  543. {
  544. struct slot *slot;
  545. struct slot *tmp;
  546. /*
  547. * Unregister all of our slots with the pci_hotplug subsystem,
  548. * and free up all memory that we had allocated.
  549. */
  550. down_write(&list_rwsem);
  551. if (!slots)
  552. goto cleanup_null;
  553. list_for_each_entry_safe(slot, tmp, &slot_list, slot_list) {
  554. list_del(&slot->slot_list);
  555. pci_hp_deregister(slot->hotplug_slot);
  556. }
  557. cleanup_null:
  558. up_write(&list_rwsem);
  559. return;
  560. }
  561. int
  562. cpci_hp_unregister_controller(struct cpci_hp_controller *old_controller)
  563. {
  564. int status = 0;
  565. if (controller) {
  566. if (!thread_finished)
  567. cpci_stop_thread();
  568. if (controller->irq)
  569. free_irq(controller->irq, controller->dev_id);
  570. controller = NULL;
  571. cleanup_slots();
  572. } else
  573. status = -ENODEV;
  574. return status;
  575. }
  576. int
  577. cpci_hp_start(void)
  578. {
  579. static int first = 1;
  580. int status;
  581. dbg("%s - enter", __func__);
  582. if (!controller)
  583. return -ENODEV;
  584. down_read(&list_rwsem);
  585. if (list_empty(&slot_list)) {
  586. up_read(&list_rwsem);
  587. return -ENODEV;
  588. }
  589. up_read(&list_rwsem);
  590. status = init_slots(first);
  591. if (first)
  592. first = 0;
  593. if (status)
  594. return status;
  595. status = cpci_start_thread();
  596. if (status)
  597. return status;
  598. dbg("%s - thread started", __func__);
  599. if (controller->irq) {
  600. /* Start enum interrupt processing */
  601. dbg("%s - enabling irq", __func__);
  602. controller->ops->enable_irq();
  603. }
  604. dbg("%s - exit", __func__);
  605. return 0;
  606. }
  607. int
  608. cpci_hp_stop(void)
  609. {
  610. if (!controller)
  611. return -ENODEV;
  612. if (controller->irq) {
  613. /* Stop enum interrupt processing */
  614. dbg("%s - disabling irq", __func__);
  615. controller->ops->disable_irq();
  616. }
  617. cpci_stop_thread();
  618. return 0;
  619. }
  620. int __init
  621. cpci_hotplug_init(int debug)
  622. {
  623. cpci_debug = debug;
  624. return 0;
  625. }
  626. void __exit
  627. cpci_hotplug_exit(void)
  628. {
  629. /*
  630. * Clean everything up.
  631. */
  632. cpci_hp_stop();
  633. cpci_hp_unregister_controller(controller);
  634. }
  635. EXPORT_SYMBOL_GPL(cpci_hp_register_controller);
  636. EXPORT_SYMBOL_GPL(cpci_hp_unregister_controller);
  637. EXPORT_SYMBOL_GPL(cpci_hp_register_bus);
  638. EXPORT_SYMBOL_GPL(cpci_hp_unregister_bus);
  639. EXPORT_SYMBOL_GPL(cpci_hp_start);
  640. EXPORT_SYMBOL_GPL(cpci_hp_stop);