fsi: sbefifo: Implement FSI_SBEFIFO_READ_TIMEOUT_SECONDS ioctl
FSI_SBEFIFO_READ_TIMEOUT_SECONDS ioctl sets the read timeout (in seconds) for the response received by sbefifo device from sbe. The timeout affects only the read operation on current sbefifo device fd. Certain SBE operations can take long time to complete and the default timeout of 10 seconds might not be sufficient to start receiving response from SBE. In such cases, allow the timeout to be set to the maximum of 120 seconds. The kernel does not contain the definition of the various SBE operations, so we must expose an interface to userspace to set the timeout for the given operation. Signed-off-by: Amitay Isaacs <amitay@ozlabs.org> Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Eddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/20220121053816.82253-3-joel@jms.id.au Signed-off-by: Joel Stanley <joel@jms.id.au>
This commit is contained in:
parent
b8d536d277
commit
a1dc630886
2 changed files with 63 additions and 0 deletions
|
|
@ -55,4 +55,18 @@ struct scom_access {
|
|||
#define FSI_SCOM_WRITE _IOWR('s', 0x02, struct scom_access)
|
||||
#define FSI_SCOM_RESET _IOW('s', 0x03, __u32)
|
||||
|
||||
/*
|
||||
* /dev/sbefifo* ioctl interface
|
||||
*/
|
||||
|
||||
/**
|
||||
* FSI_SBEFIFO_READ_TIMEOUT sets the read timeout for response from SBE.
|
||||
*
|
||||
* The read timeout is specified in seconds. The minimum value of read
|
||||
* timeout is 10 seconds (default) and the maximum value of read timeout is
|
||||
* 120 seconds. A read timeout of 0 will reset the value to the default of
|
||||
* (10 seconds).
|
||||
*/
|
||||
#define FSI_SBEFIFO_READ_TIMEOUT_SECONDS _IOW('s', 0x00, __u32)
|
||||
|
||||
#endif /* _UAPI_LINUX_FSI_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue