diff options
Diffstat (limited to 'drivers/ieee1394/hosts.h')
-rw-r--r-- | drivers/ieee1394/hosts.h | 162 |
1 files changed, 81 insertions, 81 deletions
diff --git a/drivers/ieee1394/hosts.h b/drivers/ieee1394/hosts.h index ae9b02cc013f..07d188ca8495 100644 --- a/drivers/ieee1394/hosts.h +++ b/drivers/ieee1394/hosts.h | |||
@@ -17,47 +17,47 @@ struct hpsb_packet; | |||
17 | struct hpsb_iso; | 17 | struct hpsb_iso; |
18 | 18 | ||
19 | struct hpsb_host { | 19 | struct hpsb_host { |
20 | struct list_head host_list; | 20 | struct list_head host_list; |
21 | 21 | ||
22 | void *hostdata; | 22 | void *hostdata; |
23 | 23 | ||
24 | atomic_t generation; | 24 | atomic_t generation; |
25 | 25 | ||
26 | struct sk_buff_head pending_packet_queue; | 26 | struct sk_buff_head pending_packet_queue; |
27 | 27 | ||
28 | struct timer_list timeout; | 28 | struct timer_list timeout; |
29 | unsigned long timeout_interval; | 29 | unsigned long timeout_interval; |
30 | 30 | ||
31 | unsigned char iso_listen_count[64]; | 31 | unsigned char iso_listen_count[64]; |
32 | 32 | ||
33 | int node_count; /* number of identified nodes on this bus */ | 33 | int node_count; /* number of identified nodes on this bus */ |
34 | int selfid_count; /* total number of SelfIDs received */ | 34 | int selfid_count; /* total number of SelfIDs received */ |
35 | int nodes_active; /* number of nodes that are actually active */ | 35 | int nodes_active; /* number of nodes that are actually active */ |
36 | 36 | ||
37 | nodeid_t node_id; /* node ID of this host */ | 37 | nodeid_t node_id; /* node ID of this host */ |
38 | nodeid_t irm_id; /* ID of this bus' isochronous resource manager */ | 38 | nodeid_t irm_id; /* ID of this bus' isochronous resource manager */ |
39 | nodeid_t busmgr_id; /* ID of this bus' bus manager */ | 39 | nodeid_t busmgr_id; /* ID of this bus' bus manager */ |
40 | 40 | ||
41 | /* this nodes state */ | 41 | /* this nodes state */ |
42 | unsigned in_bus_reset:1; | 42 | unsigned in_bus_reset:1; |
43 | unsigned is_shutdown:1; | 43 | unsigned is_shutdown:1; |
44 | unsigned resume_packet_sent:1; | 44 | unsigned resume_packet_sent:1; |
45 | 45 | ||
46 | /* this nodes' duties on the bus */ | 46 | /* this nodes' duties on the bus */ |
47 | unsigned is_root:1; | 47 | unsigned is_root:1; |
48 | unsigned is_cycmst:1; | 48 | unsigned is_cycmst:1; |
49 | unsigned is_irm:1; | 49 | unsigned is_irm:1; |
50 | unsigned is_busmgr:1; | 50 | unsigned is_busmgr:1; |
51 | 51 | ||
52 | int reset_retries; | 52 | int reset_retries; |
53 | quadlet_t *topology_map; | 53 | quadlet_t *topology_map; |
54 | u8 *speed_map; | 54 | u8 *speed_map; |
55 | struct csr_control csr; | 55 | struct csr_control csr; |
56 | 56 | ||
57 | /* Per node tlabel pool allocation */ | 57 | /* Per node tlabel pool allocation */ |
58 | struct hpsb_tlabel_pool tpool[64]; | 58 | struct hpsb_tlabel_pool tpool[64]; |
59 | 59 | ||
60 | struct hpsb_host_driver *driver; | 60 | struct hpsb_host_driver *driver; |
61 | 61 | ||
62 | struct pci_dev *pdev; | 62 | struct pci_dev *pdev; |
63 | 63 | ||
@@ -77,34 +77,34 @@ struct hpsb_host { | |||
77 | 77 | ||
78 | 78 | ||
79 | enum devctl_cmd { | 79 | enum devctl_cmd { |
80 | /* Host is requested to reset its bus and cancel all outstanding async | 80 | /* Host is requested to reset its bus and cancel all outstanding async |
81 | * requests. If arg == 1, it shall also attempt to become root on the | 81 | * requests. If arg == 1, it shall also attempt to become root on the |
82 | * bus. Return void. */ | 82 | * bus. Return void. */ |
83 | RESET_BUS, | 83 | RESET_BUS, |
84 | 84 | ||
85 | /* Arg is void, return value is the hardware cycle counter value. */ | 85 | /* Arg is void, return value is the hardware cycle counter value. */ |
86 | GET_CYCLE_COUNTER, | 86 | GET_CYCLE_COUNTER, |
87 | 87 | ||
88 | /* Set the hardware cycle counter to the value in arg, return void. | 88 | /* Set the hardware cycle counter to the value in arg, return void. |
89 | * FIXME - setting is probably not required. */ | 89 | * FIXME - setting is probably not required. */ |
90 | SET_CYCLE_COUNTER, | 90 | SET_CYCLE_COUNTER, |
91 | 91 | ||
92 | /* Configure hardware for new bus ID in arg, return void. */ | 92 | /* Configure hardware for new bus ID in arg, return void. */ |
93 | SET_BUS_ID, | 93 | SET_BUS_ID, |
94 | 94 | ||
95 | /* If arg true, start sending cycle start packets, stop if arg == 0. | 95 | /* If arg true, start sending cycle start packets, stop if arg == 0. |
96 | * Return void. */ | 96 | * Return void. */ |
97 | ACT_CYCLE_MASTER, | 97 | ACT_CYCLE_MASTER, |
98 | 98 | ||
99 | /* Cancel all outstanding async requests without resetting the bus. | 99 | /* Cancel all outstanding async requests without resetting the bus. |
100 | * Return void. */ | 100 | * Return void. */ |
101 | CANCEL_REQUESTS, | 101 | CANCEL_REQUESTS, |
102 | 102 | ||
103 | /* Start or stop receiving isochronous channel in arg. Return void. | 103 | /* Start or stop receiving isochronous channel in arg. Return void. |
104 | * This acts as an optimization hint, hosts are not required not to | 104 | * This acts as an optimization hint, hosts are not required not to |
105 | * listen on unrequested channels. */ | 105 | * listen on unrequested channels. */ |
106 | ISO_LISTEN_CHANNEL, | 106 | ISO_LISTEN_CHANNEL, |
107 | ISO_UNLISTEN_CHANNEL | 107 | ISO_UNLISTEN_CHANNEL |
108 | }; | 108 | }; |
109 | 109 | ||
110 | enum isoctl_cmd { | 110 | enum isoctl_cmd { |
@@ -135,13 +135,13 @@ enum isoctl_cmd { | |||
135 | }; | 135 | }; |
136 | 136 | ||
137 | enum reset_types { | 137 | enum reset_types { |
138 | /* 166 microsecond reset -- only type of reset available on | 138 | /* 166 microsecond reset -- only type of reset available on |
139 | non-1394a capable controllers */ | 139 | non-1394a capable controllers */ |
140 | LONG_RESET, | 140 | LONG_RESET, |
141 | 141 | ||
142 | /* Short (arbitrated) reset -- only available on 1394a capable | 142 | /* Short (arbitrated) reset -- only available on 1394a capable |
143 | controllers */ | 143 | controllers */ |
144 | SHORT_RESET, | 144 | SHORT_RESET, |
145 | 145 | ||
146 | /* Variants that set force_root before issueing the bus reset */ | 146 | /* Variants that set force_root before issueing the bus reset */ |
147 | LONG_RESET_FORCE_ROOT, SHORT_RESET_FORCE_ROOT, | 147 | LONG_RESET_FORCE_ROOT, SHORT_RESET_FORCE_ROOT, |
@@ -159,22 +159,22 @@ struct hpsb_host_driver { | |||
159 | * reads to the ConfigROM on its own. */ | 159 | * reads to the ConfigROM on its own. */ |
160 | void (*set_hw_config_rom) (struct hpsb_host *host, quadlet_t *config_rom); | 160 | void (*set_hw_config_rom) (struct hpsb_host *host, quadlet_t *config_rom); |
161 | 161 | ||
162 | /* This function shall implement packet transmission based on | 162 | /* This function shall implement packet transmission based on |
163 | * packet->type. It shall CRC both parts of the packet (unless | 163 | * packet->type. It shall CRC both parts of the packet (unless |
164 | * packet->type == raw) and do byte-swapping as necessary or instruct | 164 | * packet->type == raw) and do byte-swapping as necessary or instruct |
165 | * the hardware to do so. It can return immediately after the packet | 165 | * the hardware to do so. It can return immediately after the packet |
166 | * was queued for sending. After sending, hpsb_sent_packet() has to be | 166 | * was queued for sending. After sending, hpsb_sent_packet() has to be |
167 | * called. Return 0 on success, negative errno on failure. | 167 | * called. Return 0 on success, negative errno on failure. |
168 | * NOTE: The function must be callable in interrupt context. | 168 | * NOTE: The function must be callable in interrupt context. |
169 | */ | 169 | */ |
170 | int (*transmit_packet) (struct hpsb_host *host, | 170 | int (*transmit_packet) (struct hpsb_host *host, |
171 | struct hpsb_packet *packet); | 171 | struct hpsb_packet *packet); |
172 | 172 | ||
173 | /* This function requests miscellanous services from the driver, see | 173 | /* This function requests miscellanous services from the driver, see |
174 | * above for command codes and expected actions. Return -1 for unknown | 174 | * above for command codes and expected actions. Return -1 for unknown |
175 | * command, though that should never happen. | 175 | * command, though that should never happen. |
176 | */ | 176 | */ |
177 | int (*devctl) (struct hpsb_host *host, enum devctl_cmd command, int arg); | 177 | int (*devctl) (struct hpsb_host *host, enum devctl_cmd command, int arg); |
178 | 178 | ||
179 | /* ISO transmission/reception functions. Return 0 on success, -1 | 179 | /* ISO transmission/reception functions. Return 0 on success, -1 |
180 | * (or -EXXX errno code) on failure. If the low-level driver does not | 180 | * (or -EXXX errno code) on failure. If the low-level driver does not |
@@ -182,15 +182,15 @@ struct hpsb_host_driver { | |||
182 | */ | 182 | */ |
183 | int (*isoctl) (struct hpsb_iso *iso, enum isoctl_cmd command, unsigned long arg); | 183 | int (*isoctl) (struct hpsb_iso *iso, enum isoctl_cmd command, unsigned long arg); |
184 | 184 | ||
185 | /* This function is mainly to redirect local CSR reads/locks to the iso | 185 | /* This function is mainly to redirect local CSR reads/locks to the iso |
186 | * management registers (bus manager id, bandwidth available, channels | 186 | * management registers (bus manager id, bandwidth available, channels |
187 | * available) to the hardware registers in OHCI. reg is 0,1,2,3 for bus | 187 | * available) to the hardware registers in OHCI. reg is 0,1,2,3 for bus |
188 | * mgr, bwdth avail, ch avail hi, ch avail lo respectively (the same ids | 188 | * mgr, bwdth avail, ch avail hi, ch avail lo respectively (the same ids |
189 | * as OHCI uses). data and compare are the new data and expected data | 189 | * as OHCI uses). data and compare are the new data and expected data |
190 | * respectively, return value is the old value. | 190 | * respectively, return value is the old value. |
191 | */ | 191 | */ |
192 | quadlet_t (*hw_csr_reg) (struct hpsb_host *host, int reg, | 192 | quadlet_t (*hw_csr_reg) (struct hpsb_host *host, int reg, |
193 | quadlet_t data, quadlet_t compare); | 193 | quadlet_t data, quadlet_t compare); |
194 | }; | 194 | }; |
195 | 195 | ||
196 | 196 | ||