driver-changes.txt 3.9 KB

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