scsi: Only add the LUN to the command if needed

Newer SCSI controllers handle the LUN in a different place from the SCSI
command. Detect this and adjust the command accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-07-01 17:44:53 -06:00
parent 298dd563ac
commit 58aaaabd8f
3 changed files with 12 additions and 3 deletions

View File

@@ -69,6 +69,7 @@ struct blk_desc {
bool lba48;
unsigned char atapi; /* Use ATAPI protocol */
unsigned char bb; /* Use bounce buffer */
bool no_lun; /* Don't put LUN in the message */
lbaint_t lba; /* number of blocks */
unsigned long blksz; /* block size */
int log2blksz; /* for convenience: log2(blksz) */