/* Compute the highest mode possible if we are not using iordy. Return -1 if no iordy mode is available.  */
static u32 ata_pio_mask_no_iordy(const struct ata_device *adev)
/* Compute the highest mode possible if we are not using iordy. Return -1 if no iordy mode is available.  */
static u32 ata_pio_mask_no_iordy(const struct ata_device *adev)
{
	if (adev->id[ATA_ID_FIELD_VALID] & 2) {
		u16 pio = adev->id[ATA_ID_EIDE_PIO];
		if (pio) {
			if (pio > 240)
				return 3 << ATA_SHIFT_PIO;
			return 7 << ATA_SHIFT_PIO;
		}
	}
	return 3 << ATA_SHIFT_PIO;
}