driver-changes.txt 4.6 KB

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