Lines Matching full:request
97 * If the request packet has already been sent, we need to see in fw_cancel_transaction()
279 * __fw_send_request() - submit a request packet for transmission to generate callback for response
281 * @card: interface to send the request at
282 * @t: transaction instance to which the request belongs
285 * @generation: bus generation in which request and response are valid
288 * @payload: data payload for the request subaction
295 * Submit a request packet into the asynchronous request transmission queue.
303 * @generation. Otherwise the request is in danger to be sent to a wrong node.
314 * In case of request types without payload, @data is NULL and @length is 0.
321 * %RCODE_NO_ACK) denote transaction timeout, busy responder, stale request
325 * than when the request packet actually hits the wire. On the other hand,
406 * fw_run_transaction() - send request and sleep until transaction is completed
407 * @card: card interface for this request
410 * @generation: bus generation in which request and response are valid
413 * @payload: data payload for the request subaction
417 * Unlike fw_send_request(), @data points to the payload of the request or/and
419 * request payloads of >= 8 bytes but not to inbound response payloads.
560 * When a request is received that falls within the specified address range,
562 * give the details of the particular request.
636 void fw_request_get(struct fw_request *request) in fw_request_get() argument
638 kref_get(&request->kref); in fw_request_get()
643 struct fw_request *request = container_of(kref, struct fw_request, kref); in release_request() local
645 kfree(request); in release_request()
648 void fw_request_put(struct fw_request *request) in fw_request_put() argument
650 kref_put(&request->kref, release_request); in fw_request_put()
656 struct fw_request *request = container_of(packet, struct fw_request, response); in free_response_callback() local
658 trace_async_response_outbound_complete((uintptr_t)request, card->index, packet->generation, in free_response_callback()
662 fw_request_put(request); in free_response_callback()
665 fw_request_put(request); in free_response_callback()
776 struct fw_request *request; in allocate_request() local
804 fw_notice(card, "ERROR - corrupt request received - %08x %08x %08x\n", in allocate_request()
809 request = kmalloc(sizeof(*request) + length, GFP_ATOMIC); in allocate_request()
810 if (request == NULL) in allocate_request()
812 kref_init(&request->kref); in allocate_request()
814 request->response.speed = p->speed; in allocate_request()
815 request->response.timestamp = in allocate_request()
817 request->response.generation = p->generation; in allocate_request()
818 request->response.ack = 0; in allocate_request()
819 request->response.callback = free_response_callback; in allocate_request()
820 request->ack = p->ack; in allocate_request()
821 request->timestamp = p->timestamp; in allocate_request()
822 request->length = length; in allocate_request()
824 memcpy(request->data, data, length); in allocate_request()
826 memcpy(request->request_header, p->header, sizeof(p->header)); in allocate_request()
828 return request; in allocate_request()
834 * @request: firewire request data for the transaction.
837 * Submit a response packet into the asynchronous response transmission queue. The @request
841 struct fw_request *request, int rcode) in fw_send_response() argument
847 if (request->ack != ACK_PENDING || in fw_send_response()
848 HEADER_DESTINATION_IS_BROADCAST(request->request_header)) { in fw_send_response()
849 fw_request_put(request); in fw_send_response()
854 data = request->data; in fw_send_response()
855 data_length = fw_get_response_length(request); in fw_send_response()
858 fw_fill_response(&request->response, request->request_header, rcode, data, data_length); in fw_send_response()
861 fw_request_get(request); in fw_send_response()
863 trace_async_response_outbound_initiate((uintptr_t)request, card->index, in fw_send_response()
864 request->response.generation, request->response.speed, in fw_send_response()
865 request->response.header, data, in fw_send_response()
868 card->driver->send_response(card, &request->response); in fw_send_response()
873 * fw_get_request_speed() - returns speed at which the @request was received
874 * @request: firewire request data
876 int fw_get_request_speed(struct fw_request *request) in fw_get_request_speed() argument
878 return request->response.speed; in fw_get_request_speed()
883 * fw_request_get_timestamp: Get timestamp of the request.
884 * @request: The opaque pointer to request structure.
886 * Get timestamp when 1394 OHCI controller receives the asynchronous request subaction. The
890 * Returns: timestamp of the request.
892 u32 fw_request_get_timestamp(const struct fw_request *request) in fw_request_get_timestamp() argument
894 return request->timestamp; in fw_request_get_timestamp()
900 struct fw_request *request, in handle_exclusive_region_request() argument
914 request->length); in handle_exclusive_region_request()
916 handler->address_callback(card, request, tcode, destination, source, in handle_exclusive_region_request()
917 p->generation, offset, request->data, in handle_exclusive_region_request()
918 request->length, handler->callback_data); in handle_exclusive_region_request()
922 fw_send_response(card, request, RCODE_ADDRESS_ERROR); in handle_exclusive_region_request()
927 struct fw_request *request, in handle_fcp_region_request() argument
935 request->length > 0x200) { in handle_fcp_region_request()
936 fw_send_response(card, request, RCODE_ADDRESS_ERROR); in handle_fcp_region_request()
947 fw_send_response(card, request, RCODE_TYPE_ERROR); in handle_fcp_region_request()
954 if (is_enclosing_handler(handler, offset, request->length)) in handle_fcp_region_request()
955 handler->address_callback(card, request, tcode, destination, source, in handle_fcp_region_request()
956 p->generation, offset, request->data, in handle_fcp_region_request()
957 request->length, handler->callback_data); in handle_fcp_region_request()
961 fw_send_response(card, request, RCODE_COMPLETE); in handle_fcp_region_request()
966 struct fw_request *request; in fw_core_handle_request() local
981 request = allocate_request(card, p); in fw_core_handle_request()
982 if (request == NULL) { in fw_core_handle_request()
987 trace_async_request_inbound((uintptr_t)request, card->index, p->generation, p->speed, in fw_core_handle_request()
988 p->ack, p->timestamp, p->header, request->data, in fw_core_handle_request()
989 tcode_is_read_request(tcode) ? 0 : request->length / 4); in fw_core_handle_request()
993 if (!is_in_fcp_region(offset, request->length)) in fw_core_handle_request()
994 handle_exclusive_region_request(card, p, request, offset); in fw_core_handle_request()
996 handle_fcp_region_request(card, p, request, offset); in fw_core_handle_request()
1014 // and addresses match to the transaction request queried later. in fw_core_handle_response()
1065 * The response handler may be executed while the request handler in fw_core_handle_response()
1066 * is still pending. Cancel the request handler. in fw_core_handle_response()
1109 static void handle_topology_map(struct fw_card *card, struct fw_request *request, in handle_topology_map() argument
1117 fw_send_response(card, request, RCODE_TYPE_ERROR); in handle_topology_map()
1122 fw_send_response(card, request, RCODE_ADDRESS_ERROR); in handle_topology_map()
1129 fw_send_response(card, request, RCODE_COMPLETE); in handle_topology_map()
1154 static void handle_registers(struct fw_card *card, struct fw_request *request, in handle_registers() argument
1251 * the stack never sees these request. If we add in handle_registers()
1264 fw_send_response(card, request, rcode); in handle_registers()
1272 static void handle_low_memory(struct fw_card *card, struct fw_request *request, in handle_low_memory() argument
1281 fw_send_response(card, request, RCODE_TYPE_ERROR); in handle_low_memory()