mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
scsi: ufs-bsg: Change the calling convention for write descriptor
When we had a write descriptor query upiu, we appended the descriptor right after the bsg request. This was fine as the bsg driver allows to allocate whatever buffer we needed in its job request. Still, the proper way to deliver payload, however small (we only write config descriptors of 144 bytes), is by using the job request payload data buffer. So change this ABI now, while ufs-bsg is still new, and nobody is actually using it. Signed-off-by: Avri Altman <[email protected]> Reviewed-by: Evan Green <[email protected]> Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
This commit is contained in:
parent
e9cb9655f8
commit
4eaa329e33
2 changed files with 32 additions and 21 deletions
|
|
@ -147,6 +147,12 @@ send SG_IO with the applicable sg_io_v4:
|
|||
io_hdr_v4.max_response_len = reply_len;
|
||||
io_hdr_v4.request_len = request_len;
|
||||
io_hdr_v4.request = (__u64)request_upiu;
|
||||
if (dir == SG_DXFER_TO_DEV) {
|
||||
io_hdr_v4.dout_xfer_len = (uint32_t)byte_cnt;
|
||||
io_hdr_v4.dout_xferp = (uintptr_t)(__u64)buff;
|
||||
}
|
||||
|
||||
If you wish to write a descriptor, use the dout_xferp sg_io_v4.
|
||||
|
||||
UFS Specifications can be found at,
|
||||
UFS - http://www.jedec.org/sites/default/files/docs/JESD220.pdf
|
||||
|
|
|
|||
Loading…
Reference in a new issue