driver-changes.txt 4.3 KB

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