scsi: Provide some response flags

Rather than open-coding the SCSI-inquiry-response flags, add an enum and
use that.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-07-01 17:23:38 -06:00
parent 17cfa10fe0
commit 86f23ce420
4 changed files with 15 additions and 5 deletions

View File

@@ -14,6 +14,7 @@
#include <log.h>
#include <malloc.h>
#include <part.h>
#include <scsi.h>
#include <ubifs_uboot.h>
#include <dm/uclass.h>
@@ -221,7 +222,7 @@ void dev_print(struct blk_desc *desc)
puts (" Type: ");
if (desc->removable)
puts ("Removable ");
switch (desc->type & 0x1F) {
switch (desc->type & SCSIRF_TYPE_MASK) {
case DEV_TYPE_HARDDISK:
puts ("Hard Disk");
break;
@@ -235,7 +236,7 @@ void dev_print(struct blk_desc *desc)
puts ("Tape");
break;
default:
printf("# %02X #", desc->type & 0x1F);
printf("# %02X #", desc->type & SCSIRF_TYPE_MASK);
break;
}
puts ("\n");