raw1394-private.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. struct semaphore complete_sem;
  24. spinlock_t reqlists_lock;
  25. wait_queue_head_t poll_wait_complete;
  26. struct list_head addr_list;
  27. u8 __user *fcp_buffer;
  28. /* old ISO API */
  29. u64 listen_channels;
  30. quadlet_t __user *iso_buffer;
  31. size_t iso_buffer_length;
  32. u8 notification; /* (busreset-notification) RAW1394_NOTIFY_OFF/ON */
  33. /* new rawiso API */
  34. enum raw1394_iso_state iso_state;
  35. struct hpsb_iso *iso_handle;
  36. /* User space's CSR1212 dynamic ConfigROM directories */
  37. struct csr1212_keyval *csr1212_dirs[RAW1394_MAX_USER_CSR_DIRS];
  38. /* Legacy ConfigROM update flag */
  39. u8 cfgrom_upd;
  40. };
  41. struct arm_addr {
  42. struct list_head addr_list; /* file_info list */
  43. u64 start, end;
  44. u64 arm_tag;
  45. u8 access_rights;
  46. u8 notification_options;
  47. u8 client_transactions;
  48. u64 recvb;
  49. u16 rec_length;
  50. u8 *addr_space_buffer; /* accessed by read/write/lock */
  51. };
  52. struct pending_request {
  53. struct list_head list;
  54. struct file_info *file_info;
  55. struct hpsb_packet *packet;
  56. struct iso_block_store *ibs;
  57. quadlet_t *data;
  58. int free_data;
  59. struct raw1394_request req;
  60. };
  61. struct host_info {
  62. struct list_head list;
  63. struct hpsb_host *host;
  64. struct list_head file_info_list;
  65. };
  66. #endif /* IEEE1394_RAW1394_PRIVATE_H */