/* Returns a constant string giving the name of the mode requested.  */
const char* ide_xfer_verbose(u8 mode)
/* Returns a constant string giving the name of the mode requested.  */
const char* ide_xfer_verbose(u8 mode)
{
	const char *s;
	u8 i = mode & 0xf;
	if (mode >= XFER_UDMA_0 && mode <= XFER_UDMA_7)
		s = udma_str[i];
	else if (mode >= XFER_MW_DMA_0 && mode <= XFER_MW_DMA_4)
		s = mwdma_str[i];
	else if (mode >= XFER_SW_DMA_0 && mode <= XFER_SW_DMA_2)
		s = swdma_str[i];
	else if (mode >= XFER_PIO_0 && mode <= XFER_PIO_6)
		s = pio_str[i & 0x7];
	else if (mode == XFER_PIO_SLOW)
		s = "PIO SLOW";
	else
		s = "XFER ERROR";
	return s;
}