Lines Matching refs:t

234 	struct fcp_transaction t;  in fcp_avc_transaction()  local
237 t.unit = unit; in fcp_avc_transaction()
238 t.response_buffer = response; in fcp_avc_transaction()
239 t.response_size = response_size; in fcp_avc_transaction()
240 t.response_match_bytes = response_match_bytes; in fcp_avc_transaction()
241 t.state = STATE_PENDING; in fcp_avc_transaction()
242 init_waitqueue_head(&t.wait); in fcp_avc_transaction()
243 t.deferrable = (*(const u8 *)command == 0x00 || *(const u8 *)command == 0x03); in fcp_avc_transaction()
246 list_add_tail(&t.list, &transactions); in fcp_avc_transaction()
252 ret = snd_fw_transaction(t.unit, tcode, in fcp_avc_transaction()
258 wait_event_timeout(t.wait, t.state != STATE_PENDING, in fcp_avc_transaction()
261 if (t.state == STATE_DEFERRED) { in fcp_avc_transaction()
269 t.state = STATE_PENDING; in fcp_avc_transaction()
271 } else if (t.state == STATE_COMPLETE) { in fcp_avc_transaction()
272 ret = t.response_size; in fcp_avc_transaction()
274 } else if (t.state == STATE_BUS_RESET) { in fcp_avc_transaction()
277 dev_err(&t.unit->device, "FCP command timed out\n"); in fcp_avc_transaction()
284 list_del(&t.list); in fcp_avc_transaction()
301 struct fcp_transaction *t; in fcp_bus_reset() local
304 list_for_each_entry(t, &transactions, list) { in fcp_bus_reset()
305 if (t->unit == unit && in fcp_bus_reset()
306 (t->state == STATE_PENDING || in fcp_bus_reset()
307 t->state == STATE_DEFERRED)) { in fcp_bus_reset()
308 t->state = STATE_BUS_RESET; in fcp_bus_reset()
309 wake_up(&t->wait); in fcp_bus_reset()
343 struct fcp_transaction *t; in fcp_response() local
350 list_for_each_entry(t, &transactions, list) { in fcp_response()
351 struct fw_device *device = fw_parent_device(t->unit); in fcp_response()
359 if (t->state == STATE_PENDING && in fcp_response()
360 is_matching_response(t, data, length)) { in fcp_response()
361 if (t->deferrable && *(const u8 *)data == 0x0f) { in fcp_response()
362 t->state = STATE_DEFERRED; in fcp_response()
364 t->state = STATE_COMPLETE; in fcp_response()
365 t->response_size = min_t(unsigned int, length, in fcp_response()
366 t->response_size); in fcp_response()
367 memcpy(t->response_buffer, data, in fcp_response()
368 t->response_size); in fcp_response()
370 wake_up(&t->wait); in fcp_response()