driver-changes.txt 3.3 KB

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