raw1394-private.h 2.1 KB

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