summaryrefslogtreecommitdiff
path: root/lib/string.c
diff options
context:
space:
mode:
authorNeil Armstrong <neil.armstrong@linaro.org>2025-01-24 03:01:48 +0100
committerTom Rini <trini@konsulko.com>2025-01-31 11:28:55 -0600
commit664a25777728074a82a8e3e492aa7bcb53e8247e (patch)
tree58cba2fe9cbcd1a08d73d541025fb5aee283e714 /lib/string.c
parent058ed281faed1bac6005d3ebc126fae825309158 (diff)
scsi: do not fill the LUN in the second CDB byte
The SCSI specification originally required that the second Command Data Byte contain the LUN value in its high-order bits, but this field has been marked as reserved since the SCSI-3 spec from 1996. Some vendors uses this byte to pass vendor specific data, and specifying the LUN can trigger strange behaviors. For the record, this happened on an UFS device where LUN0 was working perfectly and reading the other LUNs would get the last buffer data that was read for LUN0, making this issue very very hard to debug. It's sane to assume U-Boot will probably never encounter an SCSI-2 multi-LUN device, if somehow it happens the enquiry command would need to get the SCSI level to handle this case. The Linux fix was added in [1] to fix the exact same issue. [1] https://lore.kernel.org/all/Pine.LNX.4.44L0.1409021108380.2308-100000@iolanthe.rowland.org/ Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Diffstat (limited to 'lib/string.c')
0 files changed, 0 insertions, 0 deletions