raw1394-private.h 2.1 KB

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