]> git.baikalelectronics.ru Git - arm-tf.git/commit
fix(ufs): only allow using one slot
authorJorge Troncoso <jatron@google.com>
Wed, 22 Feb 2023 08:51:31 +0000 (00:51 -0800)
committerJorge Troncoso <jatron@google.com>
Sat, 25 Feb 2023 14:32:43 +0000 (06:32 -0800)
commit56db7b8b08d5bb350a02e1f794dc6eb02827917f
tree7cc8078b6153fc05046f1def2b045aa9cbb297a4
parent3d2da6f5d3a931d97e0294f0a565b1810a55ab98
fix(ufs): only allow using one slot

Currently the UFS driver places the Command UPIU, Response UPIU, and
PRDT immediately after the UTP Transfer Request Descriptor. This space
would normally be reserved for other slots in the UTP Transfer Request
List, but because we always use slot zero, the other slots in the UTP
Transfer Request List are never used and this is okay.

Because the Command UPIU, Response UPIU, and PRDT are placed inside the
UTP Transfer Request List, the UFS driver would break if two or more
slots were used at the same time. Therefore, in a sense the
get_empty_slot() function is misleading. It gives developers the
illusion that they can use two or more slots simultaneously but in
reality they cannot.

This change deletes the get_empty_slot() function and replaces it with
is_slot_available() so that only one slot can be used.

Signed-off-by: Jorge Troncoso <jatron@google.com>
Change-Id: I57f316640a1cdd56493505ede61f3012ceb2f305
drivers/ufs/ufs.c