raw1394-private.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef IEEE1394_RAW1394_PRIVATE_H
  2. #define IEEE1394_RAW1394_PRIVATE_H
  3. /* header for definitions that are private to the raw1394 driver
  4. and not visible to user-space */
  5. #define RAW1394_DEVICE_MAJOR 171
  6. #define RAW1394_DEVICE_NAME "raw1394"
  7. #define RAW1394_MAX_USER_CSR_DIRS 16
  8. struct iso_block_store {
  9. atomic_t refcount;
  10. size_t data_size;
  11. quadlet_t data[0];
  12. };
  13. enum raw1394_iso_state { RAW1394_ISO_INACTIVE = 0,
  14. RAW1394_ISO_RECV = 1,
  15. RAW1394_ISO_XMIT = 2 };
  16. struct file_info {
  17. struct list_head list;
  18. enum { opened, initialized, connected } state;
  19. unsigned int protocol_version;
  20. struct hpsb_host *host;
  21. struct list_head req_pending;
  22. struct list_head req_complete;
  23. spinlock_t reqlists_lock;
  24. wait_queue_head_t wait_complete;
  25. struct list_head addr_list;
  26. u8 __user *fcp_buffer;
  27. /* old ISO API */
  28. u64 listen_channels;
  29. quadlet_t __user *iso_buffer;
  30. size_t iso_buffer_length;
  31. u8 notification; /* (busreset-notification) RAW1394_NOTIFY_OFF/ON */
  32. /* new rawiso API */
  33. enum raw1394_iso_state iso_state;
  34. struct hpsb_iso *iso_handle;
  35. /* User space's CSR1212 dynamic ConfigROM directories */
  36. struct csr1212_keyval *csr1212_dirs[RAW1394_MAX_USER_CSR_DIRS];
  37. /* Legacy ConfigROM update flag */
  38. u8 cfgrom_upd;
  39. };
  40. struct arm_addr {
  41. struct list_head addr_list; /* file_info list */
  42. u64 start, end;
  43. u64 arm_tag;
  44. u8 access_rights;
  45. u8 notification_options;
  46. u8 client_transactions;
  47. u64 recvb;
  48. u16 rec_length;
  49. u8 *addr_space_buffer; /* accessed by read/write/lock */
  50. };
  51. struct pending_request {
  52. struct list_head list;
  53. struct file_info *file_info;
  54. struct hpsb_packet *packet;
  55. struct iso_block_store *ibs;
  56. quadlet_t *data;
  57. int free_data;
  58. struct raw1394_request req;
  59. };
  60. struct host_info {
  61. struct list_head list;
  62. struct hpsb_host *host;
  63. struct list_head file_info_list;
  64. };
  65. #endif /* IEEE1394_RAW1394_PRIVATE_H */