Lines Matching full:request
54 * Specifies that the request expects a response. If not set, the request
56 * transmitted. If set, the request transport system waits for a response
57 * of the request.
60 * Specifies that the request should be transmitted via an unsequenced
61 * packet. If set, the request must not have a response, meaning that this
70 * struct ssam_request - SAM request description.
71 * @target_category: Category of the request's target. See &enum ssam_ssh_tc.
72 * @target_id: ID of the request's target.
73 * @command_id: Command ID of the request.
74 * @instance_id: Instance ID of the request's target.
75 * @flags: Flags for the request. See &enum ssam_request_flags.
76 * @length: Length of the request payload in bytes.
77 * @payload: Request payload data.
79 * This struct fully describes a SAM request with payload. It is intended to
94 * struct ssam_response - Response buffer for SAM request.
125 /* -- Synchronous request interface. ---------------------------------------- */
128 * struct ssam_request_sync - Synchronous SAM request struct.
129 * @base: Underlying SSH request.
130 * @comp: Completion used to signal full completion of the request. After the
131 * request has been submitted, this struct may only be modified or
133 * request has been submitted,
135 * @status: Status of the request, set after the base request has been
155 * ssam_request_sync_set_data - Set message data of a synchronous request.
156 * @rqst: The request.
157 * @ptr: Pointer to the request message data.
158 * @len: Length of the request message data.
160 * Set the request message data of a synchronous request. The provided buffer
161 * needs to live until the request has been completed.
170 * ssam_request_sync_set_resp - Set response buffer of a synchronous request.
171 * @rqst: The request.
174 * Sets the response buffer of a synchronous request. This buffer will store
175 * the response of the request after it has been completed. May be %NULL if no
188 * ssam_request_sync_wait - Wait for completion of a synchronous request.
189 * @rqst: The request to wait for.
191 * Wait for completion and release of a synchronous request. After this
192 * function terminates, the request is guaranteed to have left the transport
193 * system. After successful submission of a request, this function must be
194 * called before accessing the response of the request, freeing the request,
195 * or freeing any of the buffers associated with the request.
197 * This function must not be called if the request has not been submitted yet
198 * and may lead to a deadlock/infinite wait if a subsequent request submission
201 * Return: Returns the status of the given request, which is set on completion
220 * ssam_request_sync_onstack - Execute a synchronous request on the stack.
221 * @ctrl: The controller via which the request is submitted.
222 * @rqst: The request specification.
224 * @payload_len: The (maximum) request payload length.
226 * Allocates a synchronous request with specified payload length on the stack,
227 * fully initializes it via the provided request specification, submits it,
229 * helper macro essentially allocates the request message buffer on the stack
235 * Return: Returns the status of the request or any failure during setup, i.e.
247 * __ssam_retry - Retry request in case of I/O errors or timeouts.
248 * @request: The request function to execute. Must return an integer.
250 * @args: Arguments for the request function.
252 * Executes the given request function, i.e. calls @request. In case the
253 * request returns %-EREMOTEIO (indicates I/O error) or %-ETIMEDOUT (request
254 * or underlying packet timed out), @request will be re-executed again, up to
257 * Return: Returns the return value of the last execution of @request.
259 #define __ssam_retry(request, n, args...) \ argument
264 __s = request(args); \
272 * ssam_retry - Retry request in case of I/O errors or timeouts up to three
274 * @request: The request function to execute. Must return an integer.
275 * @args: Arguments for the request function.
277 * Executes the given request function, i.e. calls @request. In case the
278 * request returns %-EREMOTEIO (indicates I/O error) or -%ETIMEDOUT (request
279 * or underlying packet timed out), @request will be re-executed again, up to
284 * Return: Returns the return value of the last execution of @request.
286 #define ssam_retry(request, args...) \ argument
287 __ssam_retry(request, 3, args)
290 * struct ssam_request_spec - Blue-print specification of SAM request.
291 * @target_category: Category of the request's target. See &enum ssam_ssh_tc.
292 * @target_id: ID of the request's target.
293 * @command_id: Command ID of the request.
294 * @instance_id: Instance ID of the request's target.
295 * @flags: Flags for the request. See &enum ssam_request_flags.
297 * Blue-print specification for a SAM request. This struct describes the
298 * unique static parameters of a request (i.e. type) without specifying any of
300 * for defining simple request functions via the
313 * request.
314 * @target_category: Category of the request's target. See &enum ssam_ssh_tc.
315 * @command_id: Command ID of the request.
316 * @flags: Flags for the request. See &enum ssam_request_flags.
318 * Blue-print specification for a multi-device SAM request, i.e. a request
321 * parameters of a request (i.e. type) without specifying any of its
324 * used as base for defining simple multi-device request functions via the
335 * SSAM_DEFINE_SYNC_REQUEST_N() - Define synchronous SAM request function
338 * @spec: Specification (&struct ssam_request_spec) defining the request.
340 * Defines a function executing the synchronous SAM request specified by
341 * @spec, with the request having neither argument nor return value. The
342 * generated function takes care of setting up the request struct and buffer
343 * allocation, as well as execution of the request itself, returning once the
344 * request has been fully completed. The required transport buffer will be
348 * ssam_controller *ctrl)``, returning the status of the request, which is
350 * controller via which the request is being sent.
373 * SSAM_DEFINE_SYNC_REQUEST_W() - Define synchronous SAM request function with
376 * @atype: Type of the request's argument.
377 * @spec: Specification (&struct ssam_request_spec) defining the request.
379 * Defines a function executing the synchronous SAM request specified by
380 * @spec, with the request taking an argument of type @atype and having no
381 * return value. The generated function takes care of setting up the request
382 * struct, buffer allocation, as well as execution of the request itself,
383 * returning once the request has been fully completed. The required transport
388 * request, which is zero on success and negative on failure. The ``ctrl``
389 * parameter is the controller via which the request is sent. The request
414 * SSAM_DEFINE_SYNC_REQUEST_R() - Define synchronous SAM request function with
417 * @rtype: Type of the request's return value.
418 * @spec: Specification (&struct ssam_request_spec) defining the request.
420 * Defines a function executing the synchronous SAM request specified by
421 * @spec, with the request taking no argument but having a return value of
422 * type @rtype. The generated function takes care of setting up the request
424 * request itself, returning once the request has been fully completed. The
428 * ssam_controller *ctrl, rtype *ret)``, returning the status of the request,
430 * the controller via which the request is sent. The request's return value is
473 * SSAM_DEFINE_SYNC_REQUEST_WR() - Define synchronous SAM request function with
476 * @atype: Type of the request's argument.
477 * @rtype: Type of the request's return value.
478 * @spec: Specification (&struct ssam_request_spec) defining the request.
480 * Defines a function executing the synchronous SAM request specified by @spec,
481 * with the request taking an argument of type @atype and having a return value
482 * of type @rtype. The generated function takes care of setting up the request
483 * and response structs, buffer allocation, as well as execution of the request
484 * itself, returning once the request has been fully completed. The required
489 * of the request, which is zero on success and negative on failure. The
490 * ``ctrl`` parameter is the controller via which the request is sent. The
491 * request argument is specified via the ``arg`` pointer. The request's return
535 * request function with neither argument nor return value.
537 * @spec: Specification (&struct ssam_request_spec_md) defining the request.
539 * Defines a function executing the synchronous SAM request specified by
540 * @spec, with the request having neither argument nor return value. Device
542 * the function. The generated function takes care of setting up the request
543 * struct, buffer allocation, as well as execution of the request itself,
544 * returning once the request has been fully completed. The required transport
549 * request, which is zero on success and negative on failure. The ``ctrl``
550 * parameter is the controller via which the request is sent, ``tid`` the
551 * target ID for the request, and ``iid`` the instance ID.
575 * request function with argument.
577 * @atype: Type of the request's argument.
578 * @spec: Specification (&struct ssam_request_spec_md) defining the request.
580 * Defines a function executing the synchronous SAM request specified by
581 * @spec, with the request taking an argument of type @atype and having no
584 * setting up the request struct, buffer allocation, as well as execution of
585 * the request itself, returning once the request has been fully completed.
590 * status of the request, which is zero on success and negative on failure.
591 * The ``ctrl`` parameter is the controller via which the request is sent,
592 * ``tid`` the target ID for the request, and ``iid`` the instance ID. The
593 * request argument is specified via the ``arg`` pointer.
618 * request function with return value.
620 * @rtype: Type of the request's return value.
621 * @spec: Specification (&struct ssam_request_spec_md) defining the request.
623 * Defines a function executing the synchronous SAM request specified by
624 * @spec, with the request taking no argument but having a return value of
627 * setting up the request and response structs, buffer allocation, as well as
628 * execution of the request itself, returning once the request has been fully
633 * of the request, which is zero on success and negative on failure. The
634 * ``ctrl`` parameter is the controller via which the request is sent, ``tid``
635 * the target ID for the request, and ``iid`` the instance ID. The request's
679 * request function with both argument and return value.
681 * @atype: Type of the request's argument.
682 * @rtype: Type of the request's return value.
683 * @spec: Specification (&struct ssam_request_spec_md) defining the request.
685 * Defines a function executing the synchronous SAM request specified by @spec,
686 * with the request taking an argument of type @atype and having a return value
689 * setting up the request and response structs, buffer allocation, as well as
690 * execution of the request itself, returning once the request has been fully
695 * returning the status of the request, which is zero on success and negative
696 * on failure. The ``ctrl`` parameter is the controller via which the request
697 * is sent, ``tid`` the target ID for the request, and ``iid`` the instance ID.
698 * The request argument is specified via the ``arg`` pointer. The request's
837 * @cid_enable: Command ID for the event-enable request.
838 * @cid_disable: Command ID for the event-disable request.
900 * @cid_en: Command ID for the event-enable request.
901 * @cid_dis: Command ID for the event-disable request.