driver-changes.txt 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. This file details changes in 2.6 which affect PCMCIA card driver authors:
  2. * New IRQ request rules (as of 2.6.35)
  3. Instead of the old pcmcia_request_irq() interface, drivers may now
  4. choose between:
  5. - calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq.
  6. - use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will
  7. clean up automatically on calls to pcmcia_disable_device() or
  8. device ejection.
  9. - drivers still not capable of IRQF_SHARED (or not telling us so) may
  10. use the deprecated pcmcia_request_exclusive_irq() for the time
  11. being; they might receive a shared IRQ nonetheless.
  12. * no cs_error / CS_CHECK / CONFIG_PCMCIA_DEBUG (as of 2.6.33)
  13. Instead of the cs_error() callback or the CS_CHECK() macro, please use
  14. Linux-style checking of return values, and -- if necessary -- debug
  15. messages using "dev_dbg()" or "pr_debug()".
  16. * New CIS tuple access (as of 2.6.33)
  17. Instead of pcmcia_get_{first,next}_tuple(), pcmcia_get_tuple_data() and
  18. pcmcia_parse_tuple(), a driver shall use "pcmcia_get_tuple()" if it is
  19. only interested in one (raw) tuple, or "pcmcia_loop_tuple()" if it is
  20. interested in all tuples of one type. To decode the MAC from CISTPL_FUNCE,
  21. a new helper "pcmcia_get_mac_from_cis()" was added.
  22. * New configuration loop helper (as of 2.6.28)
  23. By calling pcmcia_loop_config(), a driver can iterate over all available
  24. configuration options. During a driver's probe() phase, one doesn't need
  25. to use pcmcia_get_{first,next}_tuple, pcmcia_get_tuple_data and
  26. pcmcia_parse_tuple directly in most if not all cases.
  27. * New release helper (as of 2.6.17)
  28. Instead of calling pcmcia_release_{configuration,io,irq,win}, all that's
  29. necessary now is calling pcmcia_disable_device. As there is no valid
  30. reason left to call pcmcia_release_io and pcmcia_release_irq, the
  31. exports for them were removed.
  32. * Unify detach and REMOVAL event code, as well as attach and INSERTION
  33. code (as of 2.6.16)
  34. void (*remove) (struct pcmcia_device *dev);
  35. int (*probe) (struct pcmcia_device *dev);
  36. * Move suspend, resume and reset out of event handler (as of 2.6.16)
  37. int (*suspend) (struct pcmcia_device *dev);
  38. int (*resume) (struct pcmcia_device *dev);
  39. should be initialized in struct pcmcia_driver, and handle
  40. (SUSPEND == RESET_PHYSICAL) and (RESUME == CARD_RESET) events
  41. * event handler initialization in struct pcmcia_driver (as of 2.6.13)
  42. The event handler is notified of all events, and must be initialized
  43. as the event() callback in the driver's struct pcmcia_driver.
  44. * pcmcia/version.h should not be used (as of 2.6.13)
  45. This file will be removed eventually.
  46. * in-kernel device<->driver matching (as of 2.6.13)
  47. PCMCIA devices and their correct drivers can now be matched in
  48. kernelspace. See 'devicetable.txt' for details.
  49. * Device model integration (as of 2.6.11)
  50. A struct pcmcia_device is registered with the device model core,
  51. and can be used (e.g. for SET_NETDEV_DEV) by using
  52. handle_to_dev(client_handle_t * handle).
  53. * Convert internal I/O port addresses to unsigned int (as of 2.6.11)
  54. ioaddr_t should be replaced by unsigned int in PCMCIA card drivers.
  55. * irq_mask and irq_list parameters (as of 2.6.11)
  56. The irq_mask and irq_list parameters should no longer be used in
  57. PCMCIA card drivers. Instead, it is the job of the PCMCIA core to
  58. determine which IRQ should be used. Therefore, link->irq.IRQInfo2
  59. is ignored.
  60. * client->PendingEvents is gone (as of 2.6.11)
  61. client->PendingEvents is no longer available.
  62. * client->Attributes are gone (as of 2.6.11)
  63. client->Attributes is unused, therefore it is removed from all
  64. PCMCIA card drivers
  65. * core functions no longer available (as of 2.6.11)
  66. The following functions have been removed from the kernel source
  67. because they are unused by all in-kernel drivers, and no external
  68. driver was reported to rely on them:
  69. pcmcia_get_first_region()
  70. pcmcia_get_next_region()
  71. pcmcia_modify_window()
  72. pcmcia_set_event_mask()
  73. pcmcia_get_first_window()
  74. pcmcia_get_next_window()
  75. * device list iteration upon module removal (as of 2.6.10)
  76. It is no longer necessary to iterate on the driver's internal
  77. client list and call the ->detach() function upon module removal.
  78. * Resource management. (as of 2.6.8)
  79. Although the PCMCIA subsystem will allocate resources for cards,
  80. it no longer marks these resources busy. This means that driver
  81. authors are now responsible for claiming your resources as per
  82. other drivers in Linux. You should use request_region() to mark
  83. your IO regions in-use, and request_mem_region() to mark your
  84. memory regions in-use. The name argument should be a pointer to
  85. your driver name. Eg, for pcnet_cs, name should point to the
  86. string "pcnet_cs".
  87. * CardServices is gone
  88. CardServices() in 2.4 is just a big switch statement to call various
  89. services. In 2.6, all of those entry points are exported and called
  90. directly (except for pcmcia_report_error(), just use cs_error() instead).
  91. * struct pcmcia_driver
  92. You need to use struct pcmcia_driver and pcmcia_{un,}register_driver
  93. instead of {un,}register_pccard_driver