62 VirtioFs->RequestId = 1;
67 ReqIoVec[0].Buffer = &CommonReq;
68 ReqIoVec[0].Size =
sizeof CommonReq;
69 ReqIoVec[1].Buffer = &InitReq;
70 ReqIoVec[1].Size =
sizeof InitReq;
71 ReqSgList.IoVec = ReqIoVec;
74 RespIoVec[0].Buffer = &CommonResp;
75 RespIoVec[0].Size =
sizeof CommonResp;
76 RespIoVec[1].Buffer = &InitResp;
77 RespIoVec[1].Size =
sizeof InitResp;
78 RespSgList.IoVec = RespIoVec;
85 if (EFI_ERROR (Status)) {
99 if (EFI_ERROR (Status)) {
106 InitReq.Major = VIRTIO_FS_FUSE_MAJOR;
107 InitReq.Minor = VIRTIO_FS_FUSE_MINOR;
108 InitReq.MaxReadahead = 0;
109 InitReq.Flags = VIRTIO_FS_FUSE_INIT_REQ_F_DO_READDIRPLUS;
115 if (EFI_ERROR (Status)) {
123 if (EFI_ERROR (Status)) {
124 if (Status == EFI_DEVICE_ERROR) {
127 "%a: Label=\"%s\" Errno=%d\n",
141 if ((InitResp.Major < InitReq.Major) ||
142 ((InitResp.Major == InitReq.Major) && (InitResp.Minor < InitReq.Minor)) ||
143 ((InitResp.Flags & VIRTIO_FS_FUSE_INIT_REQ_F_DO_READDIRPLUS) == 0) ||
144 (InitResp.MaxWrite < SIZE_4KB))
146 return EFI_UNSUPPORTED;
152 VirtioFs->MaxWrite = InitResp.MaxWrite;
EFI_STATUS VirtioFsFuseInitSession(IN OUT VIRTIO_FS *VirtioFs)
#define ARRAY_SIZE(Array)
#define DEBUG(Expression)
EFI_STATUS VirtioFsFuseCheckResponse(IN VIRTIO_FS_SCATTER_GATHER_LIST *ResponseSgList, IN UINT64 RequestId, OUT UINTN *TailBufferFill)
EFI_STATUS VirtioFsFuseNewRequest(IN OUT VIRTIO_FS *VirtioFs, OUT VIRTIO_FS_FUSE_REQUEST *Request, IN UINT32 RequestSize, IN VIRTIO_FS_FUSE_OPCODE Opcode, IN UINT64 NodeId)
EFI_STATUS VirtioFsSgListsSubmit(IN OUT VIRTIO_FS *VirtioFs, IN OUT VIRTIO_FS_SCATTER_GATHER_LIST *RequestSgList, IN OUT VIRTIO_FS_SCATTER_GATHER_LIST *ResponseSgList OPTIONAL)
EFI_STATUS VirtioFsErrnoToEfiStatus(IN INT32 Errno)
EFI_STATUS VirtioFsSgListsValidate(IN VIRTIO_FS *VirtioFs, IN OUT VIRTIO_FS_SCATTER_GATHER_LIST *RequestSgList, IN OUT VIRTIO_FS_SCATTER_GATHER_LIST *ResponseSgList OPTIONAL)