| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef IEEE1394_RAW1394_PRIVATE_H | 
|  | 2 | #define IEEE1394_RAW1394_PRIVATE_H | 
|  | 3 |  | 
|  | 4 | /* header for definitions that are private to the raw1394 driver | 
|  | 5 | and not visible to user-space */ | 
|  | 6 |  | 
|  | 7 | #define RAW1394_DEVICE_MAJOR      171 | 
|  | 8 | #define RAW1394_DEVICE_NAME       "raw1394" | 
|  | 9 |  | 
|  | 10 | #define RAW1394_MAX_USER_CSR_DIRS	16 | 
|  | 11 |  | 
|  | 12 | struct iso_block_store { | 
|  | 13 | atomic_t refcount; | 
|  | 14 | size_t data_size; | 
|  | 15 | quadlet_t data[0]; | 
|  | 16 | }; | 
|  | 17 |  | 
|  | 18 | enum raw1394_iso_state { RAW1394_ISO_INACTIVE = 0, | 
|  | 19 | RAW1394_ISO_RECV = 1, | 
|  | 20 | RAW1394_ISO_XMIT = 2 }; | 
|  | 21 |  | 
|  | 22 | struct file_info { | 
|  | 23 | struct list_head list; | 
|  | 24 |  | 
| Stefan Richter | 10963ea | 2008-08-16 00:11:48 +0200 | [diff] [blame] | 25 | struct mutex state_mutex; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | enum { opened, initialized, connected } state; | 
|  | 27 | unsigned int protocol_version; | 
|  | 28 |  | 
|  | 29 | struct hpsb_host *host; | 
|  | 30 |  | 
| Stefan Richter | f9edc4f | 2006-09-14 22:06:48 +0200 | [diff] [blame] | 31 | struct list_head req_pending;	/* protected by reqlists_lock */ | 
|  | 32 | struct list_head req_complete;	/* protected by reqlists_lock */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 33 | spinlock_t reqlists_lock; | 
| Stefan Richter | 45289bf | 2006-07-03 12:02:33 -0400 | [diff] [blame] | 34 | wait_queue_head_t wait_complete; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 |  | 
| Stefan Richter | f9edc4f | 2006-09-14 22:06:48 +0200 | [diff] [blame] | 36 | struct list_head addr_list;	/* protected by host_info_lock */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 |  | 
|  | 38 | u8 __user *fcp_buffer; | 
|  | 39 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | u8 notification; /* (busreset-notification) RAW1394_NOTIFY_OFF/ON */ | 
|  | 41 |  | 
|  | 42 | /* new rawiso API */ | 
|  | 43 | enum raw1394_iso_state iso_state; | 
|  | 44 | struct hpsb_iso *iso_handle; | 
|  | 45 |  | 
|  | 46 | /* User space's CSR1212 dynamic ConfigROM directories */ | 
|  | 47 | struct csr1212_keyval *csr1212_dirs[RAW1394_MAX_USER_CSR_DIRS]; | 
|  | 48 |  | 
|  | 49 | /* Legacy ConfigROM update flag */ | 
|  | 50 | u8 cfgrom_upd; | 
|  | 51 | }; | 
|  | 52 |  | 
|  | 53 | struct arm_addr { | 
|  | 54 | struct list_head addr_list; /* file_info list */ | 
|  | 55 | u64    start, end; | 
|  | 56 | u64    arm_tag; | 
|  | 57 | u8     access_rights; | 
|  | 58 | u8     notification_options; | 
|  | 59 | u8     client_transactions; | 
|  | 60 | u64    recvb; | 
|  | 61 | u16    rec_length; | 
| Stefan Richter | f9edc4f | 2006-09-14 22:06:48 +0200 | [diff] [blame] | 62 | u8     *addr_space_buffer; /* accessed by read/write/lock requests */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 63 | }; | 
|  | 64 |  | 
|  | 65 | struct pending_request { | 
|  | 66 | struct list_head list; | 
|  | 67 | struct file_info *file_info; | 
|  | 68 | struct hpsb_packet *packet; | 
|  | 69 | struct iso_block_store *ibs; | 
|  | 70 | quadlet_t *data; | 
|  | 71 | int free_data; | 
|  | 72 | struct raw1394_request req; | 
|  | 73 | }; | 
|  | 74 |  | 
|  | 75 | struct host_info { | 
|  | 76 | struct list_head list; | 
|  | 77 | struct hpsb_host *host; | 
| Stefan Richter | f9edc4f | 2006-09-14 22:06:48 +0200 | [diff] [blame] | 78 | struct list_head file_info_list;  /* protected by host_info_lock */ | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | }; | 
|  | 80 |  | 
|  | 81 | #endif  /* IEEE1394_RAW1394_PRIVATE_H */ |