[PATCH v2 14/24] ide: Use a flag for an ATAPI device
Simon Glass
sjg at chromium.org
Fri Aug 12 03:34:53 CEST 2022
Rather than setting a different interface type, use a flag to indicate
that a device is ATAPI.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
drivers/block/ide.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/block/ide.c b/drivers/block/ide.c
index 3270a9f032f..6bc48e3402e 100644
--- a/drivers/block/ide.c
+++ b/drivers/block/ide.c
@@ -525,8 +525,8 @@ static void ide_ident(struct blk_desc *dev_desc)
{
unsigned char c;
hd_driveid_t iop;
-
#ifdef CONFIG_ATAPI
+ bool is_atapi = false;
int retries = 0;
#endif
int device;
@@ -550,7 +550,7 @@ static void ide_ident(struct blk_desc *dev_desc)
(ide_inb(device, ATA_CYL_LOW) == 0x14) &&
(ide_inb(device, ATA_CYL_HIGH) == 0xEB)) {
/* ATAPI Signature found */
- dev_desc->if_type = IF_TYPE_ATAPI;
+ is_atapi = true;
/*
* Start Ident Command
*/
@@ -623,7 +623,7 @@ static void ide_ident(struct blk_desc *dev_desc)
dev_desc->removable = 0;
#ifdef CONFIG_ATAPI
- if (dev_desc->if_type == IF_TYPE_ATAPI) {
+ if (is_atapi) {
atapi_inquiry(dev_desc);
return;
}
--
2.37.1.595.g718a3a8f04-goog
More information about the U-Boot
mailing list