]> git.dujemihanovic.xyz Git - u-boot.git/commit
scsi: set dma direction to NONE for TEST UNIT READY
authorNikita Yushchenko <nikita.yoush@cogentembedded.com>
Mon, 13 Nov 2023 05:51:02 +0000 (11:51 +0600)
committerTom Rini <trini@konsulko.com>
Mon, 20 Nov 2023 13:34:08 +0000 (08:34 -0500)
commitbeeb91aa64fde9e35ccfacf03b3d0323b4bf7329
tree0d18019b10e68ec32c01f82c0698f4925791b54c
parentd5ff806cb57359ac5084e2af6a96463c9da772ba
scsi: set dma direction to NONE for TEST UNIT READY

SCSI device scan code was executing TEST UNIT READY command without
explicitly setting dma direction in struct scsi_cmd to NONE, so command
was passed to driver with dma direction set to DMA_FROM_DEVICE,
inherited from older usage.

With WDC SDINDDH6-64G ufs device, that caused TEST UNIT READY to
return error.

Fix that, by explicitly setting dma direction to NONE for
TEST UNIT READY, and restoring it back DMA_FROM_DEVICE for the
following READ CAPACITY.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Reviewed-by: Marek Vasut <marex@denx.de>
drivers/scsi/scsi.c