Rather than setting a different interface type, use a flag to indicate
that a device is ATAPI.
Signed-off-by: Simon Glass <sjg@chromium.org>
{
unsigned char c;
hd_driveid_t iop;
-
#ifdef CONFIG_ATAPI
+ bool is_atapi = false;
int retries = 0;
#endif
int device;
(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
*/
dev_desc->removable = 0;
#ifdef CONFIG_ATAPI
- if (dev_desc->if_type == IF_TYPE_ATAPI) {
+ if (is_atapi) {
atapi_inquiry(dev_desc);
return;
}