driver-changes.txt 3.1 KB

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